I'm sure I'm not the only one, but I cannot parse/return anything when jQuery takes a request to lookup an address when the data being requested is the latitude
and longitude
so Google can return the data, but it cannot be read by jQuery?
http://maps.googleapis.com/maps/api/geocode/json
With parameters:
latlng=51.276914,1.077252
&sensor=false
In Firebug it says 200 OK
but nothing is displayed in the response:
I can see it when I open it: http://maps.googleapis.com/maps/api/geocode/json?latlng=51.187296,1.229086&sensor=false&_=1302084865163
What I did was:
$.ajax(
{
url: 'http://maps.googleapis.com/maps/api/geocode/json',
data: 'latlng=' + geolocation + '&sensor=false',
dataType: 'json',
cache: false,
success: function(data){ alert(data); }
});
That doesn't work... neither $.get
, $.getJSON
with the json
dataType
.
Why can't jQuery parse/read the response?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…