$url = 'http://maps.google.com/maps/geo?q=EC3M,+UK&output=csv&sensor=false'; $data = @file_get_contents($url); $result = explode(",", $data); echo $result[0]; // status code echo $result[1]; // accuracy echo $result[2]; // latitude echo $result[3]; // longitude ...
3. 检查Google Maps API密钥 确保API密钥有效:如果你是通过开发者API使用Google地图,确保你的API密钥是有效的并且没有被限制。 检查API配额和使用情况:有时候API配额用完也会导致地图无法显示。 4. 更新Google Maps应用或浏览器 更新Google Maps应用:确保你使用的是最新版本的Google Maps应用。
I found that if the location is one of several that would be returned from a Maps search, an error is displayed. No real surprise there. You have to specify enough detail to make it unique. Here in the UK I was searching for ‘Dover’, but until I put ‘Dover, Kent’ the distance...
$url = 'http://maps.google.com/maps/geo?q=EC3M,+UK&output=csv&sensor=false'; $data = @file_get_contents($url); $result = explode(",", $data); echo $result[0]; // status code echo $result[1]; // accuracy echo $result[2]; // latitude echo $result[3]; // longitude ...