There are many questions regarding Google Maps V3 API waypoints but none that address how to get optimal round trip route from a set of arbitrary waypoints. Basically, the order of weighpoints should be determined by whatever is the most optimum path and is not necessarily dictated by the order fed into the system. Does anybody know if this is even possible?
There are many questions regarding Google Maps V3 API waypoints but none that address
Share
There is an “optimize” option in the V3 API. Have you tried it?
optimizeWaypointsFirst paragraph from https://developers.google.com/maps/documentation/javascript/reference.
Second from https://developers.google.com/maps/documentation/javascript/directions