如何在 php 中使用 Google Direction api 使用 routeBoxer 获取框?

How to get box using routeBoxer using Google Direction apis in php?

我试图在 google 方向 api 中获取 overview_path,但它没有出现在响应中。

当我使用 js sdk 时,我在路由数组中得到了 overview_path 数组,但是当我尝试在邮递员中调用方向 api 时,overview_path 数组在路由数组。 这里是postman的url

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 为我的路径获取框。

overview_polyline 是 overview_path 的编码版本,您需要对其进行解码,然后才能得到经纬度。 http://unitstep.net/blog/2008/08/02/decoding-google-maps-encoded-polylines-using-php/