I want to generate the longitude and latitude values by giving address in the back-end. For example, If I inserted my address like area,city,state,country in the back-end then it should generate the longitude and latitude values and it should show the marker to that location.

This I have done in the googlemap now I want to use it in the openstreetmap. Please help me with a sample code.

Thanks in advance

asked 22 Feb '11, 10:44

psn's gravatar image

psn
54448
accept rate: 0%

edited 22 Feb '11, 12:06

Andy%20Allan's gravatar image

Andy Allan
11.8k23121144

I have to try to guess what this means.

Guess number 1: You want a javascript map interface, and search box (on the interface) which does a call to a search service, and then places a marker at the location of the first match.

Guess number 2: You want server-side code (which language are you using?) to call a search service and generate a link of the form "http://www.openstreetmap.org/?lat=[Returned latitude]&lon=[Returned logitude]&zoom=14" spitting out the results to file e.g. for bulk geocoding spreadsheet data.

So which is it? Can you re-write you question more clearly.

(22 Feb '11, 13:31) Harry Wood

Thanks for your reply, Your 2nd Guess matches to my question. I just give my input as city,state,country,etc. The output should show the marker to the given address. what i mean is the code should generate the longitude and latitude values and also have to generate the pointer to that location(based on the generated longitude and latitude values). Iam using PHP scripting.

(23 Feb '11, 06:04) psn

Take a look at the Nominatim Examples in the OpenStreetMap Wiki!

permanent link

answered 22 Feb '11, 10:58

gnurk's gravatar image

gnurk
6.1k106095
accept rate: 15%

Thanks for your reply, Not getting map. What i need is, i should have a choice to enter the address or by static like area,city,state,etc. After that the openstreetmap should display with the pointer with the given address.

once again thanks for your reply.

(22 Feb '11, 11:43) psn

For a javascript search interface you might like to take a look at FacilMap, which bundles OpenLayers and add various bits. This includes an interface for searching, which calls the Nominatim search service, shows result matches, and places a marker (or markers) on the map.

permanent link

answered 22 Feb '11, 13:35

Harry%20Wood's gravatar image

Harry Wood
9.3k2486126
accept rate: 13%

Did you ever find a way to do this. I am trying to do the same using Python or objective c type code..

permanent link

answered 29 Jul '13, 06:55

abolfasl's gravatar image

abolfasl
111
accept rate: 0%

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:

×113
×18

question asked: 22 Feb '11, 10:44

question was seen: 14,051 times

last updated: 29 Jul '13, 06:55

powered by OSQA