Question

I am working with the mapquest open geocoding api and some of the options don't work when POST ing requests to the api.

For example, this HTTP GET request adheres to the ignoreLatLngInput, thumbMaps and maxResults options

http://open.mapquestapi.com/geocoding/v1/address?inFormat=kvp&outFormat=json&ignoreLatLngInput=true&thumbMaps=false&maxResults=3&location=Boston,+MA

but when the same values are submitted via a HTTP POST they are ignored and some even cause the request to fail.

Was it helpful?

Solution

use the following.

$.getJSON(
    "http://nominatim.openstreetmap.org/reverse?format=json&lat="+lat+"&lon="+lon+"",
     function(data) {
         var loc = data.display_name;   
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top