2012-04-27 51 views

回答

8

V3 API中有一個「優化」選項。你試過了嗎?

optimizeWaypoints

https://developers.google.com/maps/documentation/javascript/reference
If set to true, the DirectionService will attempt to re-order the supplied 
intermediate waypoints to minimize overall cost of the route. If waypoints 
are optimized, inspect DirectionsRoute.waypoint_order in the response to 
determine the new ordering. 

optimizeWaypoints (optional) specifies that the route using the supplied 
waypoints may be optimized to provide the shortest possible route. 

第一段。

第二個從https://developers.google.com/maps/documentation/javascript/directions

+0

我沒有注意到這個選項。謝謝! – VinnyD 2012-04-28 17:55:47

+0

有沒有人知道如何做到這一點比有限的航點? – 2014-09-30 10:51:16