Pregunta

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.

¿Fue útil?

Solución

use the following.

$.getJSON(
    "http://nominatim.openstreetmap.org/reverse?format=json&lat="+lat+"&lon="+lon+"",
     function(data) {
         var loc = data.display_name;   
});
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top