NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I wish to create a classified website and need the database of several countries so that users can post classifieds and find them by location. I wish also to give the possibility to insert and find classifieds directly on map. I'm wondering if I can extract and use the location database and use the OSM map maybe through some api to do that. In the affirmative, where to start? I am totally new to OSM and trying to find the answer on the wiki but,as there are so many informations, after dome days I could not get those I am looking for. Thanks for help!

asked 27 Feb '15, 10:22

jakehook's gravatar image

jakehook
11112
accept rate: 0%

edited 27 Feb '15, 13:39

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701

Note a classified website is not a website with classified ads, I've fixed the title.

(27 Feb '15, 13:40) SimonPoole ♦

Thank you very much for your prompt answers.
Maybe I was not able to explain what I am looking for or I didn't do it clearly.

I need 2 things:

  • the first is to have the database of locations. In my question I said several countries as I really would like to expand the service also to other countries than mine (Italy). For this part I don't need a map at all. Users of website, when post their ads, should also say where objects are and users who are looking for some objects should be able to find objects by location. It is a classical classified websites. But I don't know where to get a database of location of Italy and other countries. So the first question is if I can fetch these databases from OSM data. Maybe it would even better if there were an api or a way to connect directly to the OSM database without importing it in my own server. But I suppose this is not possible as it could generate lots of traffic and connections on OSM server if everyone with similar needings would do the same.

  • the second is related to a potential way of searching ads and it would be map based. I try to make an example. A user looking for a surf board who lives in an area that is close to two administrative areas. This user could be interested in ads from not only the administrative area where he/she lives but also to those ones coming from next area/s. So I wish to create the possibility to draw/trace geographical areas on a map and to pass to the internal website search engine all the locations within the area drawn by the user. This advanced way to search should avoid users to search twice or more the same objects in several administrative area. It is an old idea of mine. I don't know if someone has already done this. But specially how to do that!

The project would be commercial and users would not affect OSM data. Obviously at the beginning I don't think to have much traffic, but the hope is to have success. So my idea would be to render the map on my way to not to have to change in future the website. I know there are several things about licensing but I didn't ask here because I didn't want to mix the two things and before worrying about legal I wish to understand if technically it is possible to do what above.
Thank you again for your help!

(27 Feb '15, 16:30) jakehook

ops, I didn't know it. thank you!

(27 Feb '15, 16:35) jakehook

For startes see switch2osm.org While it is not completly clear from you question what you actually want to do, using an OSM based map as a background is easy, you -will- have to store your classified data somewhere else naturally.

As to finding the geographic coordinates of an entry, that is so called geocoding. This can be done with OSM, however address coverage ranges from 100% in some contries to essentially zero in others. Further note: geocoding with OSM may create legal and licence related obligations that you will have to comply with, this however depends very much on the details of what you are doing.

permanent link

answered 27 Feb '15, 13:29

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

edited 27 Feb '15, 13:37

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866

It's also worth mentioing that one of the switch2osm.org examples is a "building plot finder" - that sounds not a million miles away from what you are trying to do.

(27 Feb '15, 13:36) SomeoneElse ♦

It sounds good, but I can't find this example "building plot finder" in the switch2osm website. Where did you find it? Anyway this website is really clear and helpful. Thank you all for the suggestion!

(28 Feb '15, 10:57) jakehook
1

The "building plot" example is referred to from https://switch2osm.org/using-tiles/getting-started-with-leaflet/ .

(28 Feb '15, 11:01) SomeoneElse ♦

Thank you!

(28 Feb '15, 16:33) jakehook

It seems that you need solutions for two tasks:

1) display a map based on OSM data ... that is very easy when you use pre-rendered tile graphics from any server that offers them in a style you like, and if the use of your website does not cause too much traffic on the servers where those tiles are stored.

For this task you should use a framework like leaflet or OpenLayers ... visit their websites and browse the examples / plugins of each. Tr to find examples where objects are displayed on a map where coordinates and content come from an own file or database.

2) find a solution how to create, store and display the classified ads from each user. I don't know any solution out of the box, but it sounds like a similar requirement like the OSM notes.

Tell us when you have found something that come near your aim, then we can help in detail.

permanent link

answered 27 Feb '15, 13:28

stephan75's gravatar image

stephan75
12.6k556210
accept rate: 6%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×535
×202
×104
×2

question asked: 27 Feb '15, 10:22

question was seen: 4,722 times

last updated: 28 Feb '15, 16:33

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum