2013-07-22 79 views
-2

我有一個拉特和長期,並希望通過http請求發送這些東西像谷歌地圖和檢索英國的郵編。從緯度和經度獲取一個郵政編碼

這可能嗎?

+0

該過程被稱爲反向地理編碼...和Google Maps支持它。 https://developers.google.com/maps/documentation/geocoding/ – Orangepill

+0

你的意思是[this](http://www.geocodezip.com/v3_GoogleEx_geocoding-reverse2postcode.html)? – geocodezip

回答

0

$ json = file_get_contents(「http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=manchester+uk」);

$ json = json_decode($ json);

$ json是一個數組;因此,你可以從 http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=manchester+uk

訪問任何數據。如果您需要查找的緯度和經度,你可以用這個代替網址: http://maps.googleapis.com/maps/api/geocode/json?latlng=53.39990299999999,-2.30009690&sensor=false

相關問題