我想用PHP解析这个URL以获得特定地址的纬度(2 bis avenue Foch75116 Paris FR):
我使用谷歌 Map 网络服务:http://maps.googleapis.com/maps/api/geocode/json?address=2+bis+avenue+Foch75116+Paris+FR&sensor=false
// Get the JSON
$url='http://maps.googleapis.com/maps/api/geocode/json?address=2+bis+avenue+Foch75116+Paris+FR&sensor=false';
$source = file_get_contents($url);
$obj = json_decode($source);
var_dump($obj);
它不起作用 . 我有这个错误:
OVER_QUERY_LIMIT
所以我在网上搜索,我发现使用谷歌 Map api有限制(2个查询之间最少1秒,每天最多2500个查询)
你知道如何将地址转换为 - >纬度/经度???
1 回答
您正在错误地访问
results
.