I am looking to have a address, city, and zip code text box. I am saving the info to a database. What i need to know is how i can get the data if i pass it. The code for passing the info to the OSM map that i am using would be something like this [@Business_City].

I have looked to see if there is any code on how to retrieve data and show it on the map with javascript code. If there is anyone out there that can help me i would appreciate it. Code is at this link http://demositepca.com/job_system/map_code.html

asked 08 Jul '17, 10:10

ejw3160's gravatar image

accept rate: 0%

edited 09 Jul '17, 13:49

SimonPoole's gravatar image

SimonPoole ♦


You really need to be clearer about what you are trying to do, if using English is difficult, please feel free to ask in your native tongue.

(08 Jul '17, 12:35) SimonPoole ♦

Here i s what i am trying to do. I have a address, city, state, and zip text boxes. When i submit the data to the database it also passed to the page where the OSM map is. I would like the map to locate the address or be close enough for people to move the pointer to where there house or apt would be.

I just need to know if there is a way when i pass the data it can be implemented in the map when the page loads.

I know there is a search feature on the map but i dont think this would work for me. I need it to point to the address or close to it.

If you know of a way to do this please let me know.

(09 Jul '17, 12:31) ejw3160

While it is not completely clear what you want to do, I suspect you could submit your address data to a Photon instance and display your mouse pointer of whatever at the location of the best match (Photon will return the results as geo-json whcih should be simply to process in JS).

Note: address coverage in OSM varies wildly with country and region, you will need to check if it is sufficient for your purposes regardless of the technical implementation.

permanent link

answered 09 Jul '17, 13:47

SimonPoole's gravatar image

SimonPoole ♦
accept rate: 19%

edited 09 Jul '17, 13:48

Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 08 Jul '17, 10:10

question was seen: 1,298 times

last updated: 09 Jul '17, 13:49

powered by OSQA