0

我正在尝试在 google direction api 中获取 overview_path,但它没有出现在响应中。

当我使用 js sdk 时,我在 routes 数组中获取了 overview_path 数组,但是当我尝试在 postman 中调用方向 api 时,在 routes 数组中缺少 overview_path 数组。这是邮递员的网址。

https://maps.googleapis.com/maps/api/directions/json?origin=Disneyland&destination=Universal+Studios+Hollywood4&key=please_add_your_key&alternatives=true&units=metric&mode=driving

我正在尝试使用 routeBoxer 为我的路径获取框。

4

1 回答 1

0

有overview_polyline,它是overview_path的编码版本,你需要解码它,你会得到它的lat,lng。 http://unitstep.net/blog/2008/08/02/decoding-google-maps-encoded-polylines-using-php/

于 2017-10-06T06:08:39.093 回答