On Nov 29, 7:24 am, koritfw <[email protected]> wrote: > Hi! This is my problem: I have more locations on a map. Is there a > function to know which order would be the best to take? I need to find > the shortest path (the roads) to visit these different locations.
That would be the travelling salesman problem. The directions service supports optimizing a path through specified waypoints (up to 8 waypoints for the free API, 23 for premier licenses): http://code.google.com/apis/maps/documentation/javascript/reference.html#DirectionsService optimizeWaypoints boolean 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. -- Larry > Thanks for your help. > > Ps: sorry for my bad english... -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
