0

My client makes deliveries and needs to record the mileage driven between each stop as well as a total miles for the day. The route is known ahead of time. The addresses are also known so I am able to obtain the lat/long of the addresses for Google maps. I'd like to get the distance for each leg and record them in the database for end of year reporting as well as a grand total of miles driven for the year (the grand total is the easy part so that doesn't really need to be addressed).

1) Is this possible with the current Google Maps API? I have the Google map key.
2) If yes, do you have a link to a demo that I can look at?

I'm coding this in ColdFusion but would be open to reverse engineering a PHP page.

4

1 回答 1

0

这是可能的,您必须请求DirectionsService。服务响应将包含每个步骤的距离(示例),您只需要从响应中获取所需的数据。

注意:您最多只能请求具有 8 个航点的路线,当您的路线包含更多航点时,您必须拆分路线。

于 2013-02-06T20:13:24.580 回答