我想使用Google地图API通过邮政编码获取经纬度。
我正在使用PHP进行开发。
我该怎么做?
这个邮政编码可以来自世界上任何地方。
我想使用Google地图API通过邮政编码获取经纬度。
我正在使用PHP进行开发。
我该怎么做?
这个邮政编码可以来自世界上任何地方。
http://code.google.com/apis/maps/documentation/geocoding/
<?php
$url ="http://maps.googleapis.com/maps/api/geocode/xml?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false";
$result = simplexml_load_file($url);
print"<pre>";
print_r($result);
?>
https://maps.googleapis.com/maps/api/geocode/json?address=SW5+0RQ&sensor=false&components=country:UK
。 - Gajus