Wasn't it Li Li who wrote: > >Hi Marcelo: >I've checked the sample which you gived, but it seems the "sort" >function just calculated the base to the target by the absolute >distance. >I want get the shortest driving distance, not the absolute distance. >could you give me some suggestion? I really don't want to calculate >them one by one :(
It's extremely likely that the ATM with the shortest driving distance will be in the first five ATMs with the shortest straight line distance. So find the straight line distances for all the ATMs, sort them, and then only request distances for the first five. It's theoretically possible, but very unlikely, that you'll miss the ATM with the shortest route by doing it that way, but the number of such situations will be swamped by those where the shortest route is not chosen due to the inaccuracy in the position of the user's starting point. -- 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 -~----------~----~----~----~------~----~------~--~---
