Once you find the nearest, say, 10, straight line distances, you can
make one GDirections request with 19 waypoints. From User to P1 to User
to P2 to User to P3 etc.
Then read the data back from alternate GRoutes. Something like this:
var shortDist = Infinity;
var shortIndex;
for (var i=0; i<gdir.getNumRoutes(); i+=2) {
var dist = gdir.getRoute[i];
if (dist < shortDist) {
shortDist = dist;
shortIndex = i/2;
}
}
--
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---