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

1
1

Hi,

I am working in a real estate site.If customer enters something in a text box, i need to display the openstreet map based on the user queries with markers (For reference: Like this) in a reference site they have done using google map. But client's requirement is opensteet map. Where i needs to start? Could you please someone can guide me through?

asked 21 May '12, 06:18

Raj's gravatar image

Raj
21336
accept rate: 0%


You need:

  • a Javascript library like OpenLayers or Leaflet to display the map
  • a geocoding service like Nominatim to find the geo-coordinates for a given address
  • a tile server from which to load map tiles
  • a little glue coding that puts it all together (get address from user, send to Nominatim, create marker for position returned, display on map)

For points 2 and 3 you will either be relying on a service provided by someone else (which may cost money and may be subject to certain usage restrictions) or you will be setting up your own server(s) (which may require considerable resources).

The switch2osm.org web site has good resources aimed at people looking for a Google maps replacement.

permanent link

answered 21 May '12, 07:48

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 21 May '12, 07:49

Hi,

I tried to implement but i failed. Could you please post some sample code. I mean i don't know how to includes all together (1,2 and 3). Please help me out.

(21 May '12, 13:39) Raj

A brief link for a start http://wiki.openstreetmap.org/wiki/Openlayers_POI_layer_example This is an example how to use OpenLayers to show POIs on top of a OpenStreetMap base map.

The next step is to get that locations from a database: http://wiki.openstreetmap.org/wiki/OpenLayers_Dynamic_POI

Note that there are other frameworks too, for example Leaflet. It could be even better suited, but I haven't yet used Leaflet.

permanent link

answered 21 May '12, 07:43

Roland%20Olbricht's gravatar image

Roland Olbricht
6.7k36489
accept rate: 36%

Your answer
toggle preview

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:

×202
×193
×25

question asked: 21 May '12, 06:18

question was seen: 6,499 times

last updated: 21 May '12, 14:01

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