On 25 May 2010 15:26, CFGilles <[email protected]> wrote: > > I have a point of origin and I want to use Google Maps API to > calculate the distance between multiple coordinates. Is it possible ?? > It's easy yo calculate the distance between 2 points but how about > multiple points ? > > Exanple : I have a point and I have a list of (let's say) 12 other > points. How can I use the Google Maps API to calculate the distance > between Point A and all the other 12 points ? I need to have the > results for each points.
If we call your point of origin A, and the others B, C, D..., do you mean you want separate distances AB, AC, AD... or the total distance ABCD...? Are you talking straight-line distances or driving (directions) distance? Assuming it's AB, AC, AD... and driving directions, you need to perform multiple GDirections requests. Take care to space them out so you don't fall foul of the rate limit. This page is relevant http://econym.org.uk/gmap/geomulti.htm -- although it deals with geocoding, directions are similar. -- 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.
