Reputation: 11
I'm trying to do the following, but I don't know if it is possible, and in case it is, how to implement it.
Having a set of polylines (which would represent routes) already defined, I want the user to be able to select two points (from and to) and present him with the shortest polyline/route from the set, which he/she would then use to go from point A to point B.
Is that possible?
Thanks.
Upvotes: 1
Views: 2036
Reputation: 8819
You can use the Google Maps API Geometry Library to compute the length of each route, and then select the one that is shortest.
Upvotes: 2