在新的谷歌地图中有几种出行模式,如驾驶,骑自行车,步行和交通,但他们也增加了飞行模式。我可以在新的谷歌地图中选择飞行模式,但在谷歌地图v3应用程序接口中我无法获得飞行旅行模式。我想在我的网站上显示两个城市之间的飞行距离,就像谷歌地图在谷歌地图上显示的那样。
http://maps.googleapis.com/maps/api/directions/xml?sensor=false&origin=Lahore&destination=Multan&mode=driving
$base_url = 'http://maps.googleapis.com/maps/api/directions/xml?sensor=false';
$xml = simplexml_load_file("$base_url&origin=Lahore&destination=Multan");
echo $distance = (string)$xml->route->leg->distance->text;
echo $duration = (string)$xml->route->leg->duration->text驾驶、步行和其他模式都可以工作,但fly不能工作。
发布于 2013-10-30 14:36:35
唤醒和驾驶模式仅适用于Google地图api。飞行模式不可用。
检查此link
https://stackoverflow.com/questions/19674613
复制相似问题