What is the "nearest point" to another point? ;-) Assuming you mean the "nearest point out of a predefined set of points", and assuming you don't have too many points, you can do it with only one GDirections object, in two steps: First check the distance to each destination point.You can do that by adapting this example: http://maps.forum.nu/gm_driving_radius.html Then store the information in an array, and sort the array, like this: http://maps.forum.nu/gm_array_sort.html
-- Marcelo - http://maps.forum.nu -- On Dec 26, 9:30 pm, andryaries <[email protected]> wrote: > Hi, I have one GLatLng object,and I want to obtain the nearest point > to it (using driving distance) chosed between 3 points... > How could I do this??? > Have I to use three gdirections? > Can I use three event listener to put inside them getdistance method > or is there a limit? > Thank you and sorry for my bad english! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
