On Oct 10, 8:06 am, Sunny <[EMAIL PROTECTED]> wrote: > Hi Marcelo, > > I looked at the code, > But didn't found what I was looking for. > If I have bunch of Lat & Longs & I take the first one from the group, > Now If I want to see, which point from the group is closer to the > First Lat & Long. > > How should I do it? (I assume you are asking about straight line distance) 1. calculate the distance from that point to all the others (GLatLng.distanceFrom) 2. find the smallest number (be sure to skip the original point or verify that the distance isn't zero)
There is an example [closest] here: http://www.geocodezip.com/testgeocodezip.asp from the old v1 days, before distanceFrom existed. Larry -- Larry > > On Oct 10, 10:27 am, marcelo <[EMAIL PROTECTED]> wrote: > > > > > You can do something like this:http://maps.forum.nu/gm_array_sort.html > > > -- > > Marcelo -http://maps.forum.nu > > --- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
