2011年10月12日 星期三

透過google map由地址查詢經緯度

參考文件 http://code.google.com/intl/zh-TW/apis/maps/documentation/javascript/v2/services.html

測試 http://maps.google.com/maps/geo?q=%E5%8F%B0%E5%8C%97%E5%B8%82%E5%8D%97%E6%B8%AF%E5%8D%80%E4%B8%89%E9%87%8D%E8%B7%AF66%E8%99%9F&output=json&sensor=true

回傳

{ "name": "台北市南港區三重路66號", "Status": { "code": 200, "request": "geocode" }, "Placemark": [ { "id": "p1", "address": "115台灣台北市南港區三重路66號", "AddressDetails": { "Accuracy" : 8, "Country" : { "AdministrativeArea" : { "AdministrativeAreaName" : "台北市", "Locality" : { "DependentLocality" : { "DependentLocalityName" : "三重里", "PostalCode" : { "PostalCodeNumber" : "115" }, "Thoroughfare" : { "ThoroughfareName" : "三重路66號" } }, "LocalityName" : "南港區" } }, "CountryName" : "台灣", "CountryNameCode" : "TW" } }, "ExtendedData": { "LatLonBox": { "north": 25.0587660, "south": 25.0560680, "east": 121.6156030, "west": 121.6129050 } }, "Point": { "coordinates": [ 121.6142540, 25.0574170, 0 ] } } ] }

沒有留言:

張貼留言