2012-04-27 53 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