1
$.getJSON('http://api.wipmania.com/jsonp?callback=?', function (data) {
$("#hello").html('Latitude: ' + data.latitude +
'<br /> Longitude: ' + data.longitude +
'<br /> Country: ' + data.address.country);
});
我經常使用上面的代碼來獲得latitude,longitude,country
。但很多時候它不能正常工作更好的API來檢索經度/緯度數據
Latitude: 0
Longitude: 0
Country: Unknown
是否有更好的API來獲得這些結果?
您可能希望將問題的標題修改爲「更好的API來檢索經度/緯度數據」。 JSON數據非常含糊。 – Despertar
如果你想從一個地址得到latlong,我推薦谷歌地圖。 https://developers.google.com/maps/documentation/geocoding/#GeocodingResponses – Tim
@ Despertar:我按照您的建議更改了標題 – underscore