I'm currently in the very beginning of exploring the maps possibilities, at the moment by using Google Maps JS v3 API. I have a database running, with a lot of addresses (in form of following format: "Street" "house-number", "postal-code" ), which I'm extracting in XML by using PHP code. My currently experiment with Google maps api works fine, first by reading my XML document generated with my PHP page, and the transforming each address in the XML into latlng by using Googles geocode service. The problem among others, that I'm hitting the limitations of the Google geocode, and for my purpose of use with the map service, it would violate with the publicity demand by their license rules (not becuase the code is "secret", but because the page is running internally. Anyways, I'm now searching for a more flexible, and more open source friendly source. And thats why I'm here, trying to figure out how to work with OSM etc. I read some information about "Open Geocode Service with MapQuest" link But I can't figure out, how to turn the request into lng and lat that I can turn into markers?? My aim is to via geocode, turn each of my address in the database, into a marker on the map (preferable OSM). asked 23 Jan '13, 13:52 Grmihel SimonPoole ♦ |
A side-note: OSM data (also google's data) is incomplete - you probably will not get a (or only get a very approximate) location for every address. How to do geocoding with OSM data? You already mentioned the right keyword/tag. See the questions tagged geocoding (also try other tags or searches on this help page - this is a very popular topic for which you will find many answers). Shortcut - see: our docu wiki's entry about Nominatim. If you are also searching for a JS library for displaying a map with markers, then you may want to have a look at Leaflet. If you find some more accurate info matching your question, please add it as an answer yourself. answered 24 Jan '13, 00:56 aseerel4c26 ♦ |
I already did some research around, but it seems to me to be a little hard to find an equally to Google geocode structure.
Right now with my OSM/OMQ experiment, I'm using the HTTP URL to get lat and lng from an address, and turn it into a marker on the map. But I'm getting lost in how to hand over custom parameters, and what is possible with it. My currently experiment code look like:
But since the functions already run in a JS on a htm page, it seems quiet pointless doing the first codeblock. But I can't find a more smooth way to handle the geocoding block...?? Ain't it possible to use eg. Open Map Quest more like the Google.geocoder ?? (Couldn't seem to find any other threads giving me a hint to work on :( ) Edit: I'm calling the doClick function with url string as: http://open.mapquestapi.com/geocoding/v1/address?location='+address+'&callback=renderGeocode answered 25 Jan '13, 09:41 Grmihel |