如何在php中使用Google方向apis使用routeBoxer获取盒子?

时间:2017-10-04 06:37:17

标签: google-maps google-maps-api-3 routeboxer

我想在google方向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获取路径框。

1 个答案:

答案 0 :(得分:0)

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