对于我的应用程序,我需要一台服务器来计算行车路线。

Google Maps API 仅供客户使用,使用Javascript和Flash API。有什么办法可以运行他们的API服务器端吗?

有帮助吗?

解决方案

据我所知,这不是正式的,谷歌不支持它,但它有效:

$url = str_replace(' ', '%20', "http://maps.google.com/maps/nav?client=yourclient&output=json&q=from: ".$lat1.",".$lon1." to: ".$lat2.",".$lon2);

$result = file_get_contents($url);
$data = json_decode(utf8_encode($result), true);

你将在$ data array中有方向。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top