> If you know the closet vertex (N), you might compare the distance from > target to vertex N+1 and N-1, to find the 'next closest' point. Then > insert the new point in between.
There are some corner cases where that won't work (especially in case with sharp jogs where the next closest vertex might NOT be if you follow the line.. like a click near the middle of an elongated Z). I just ended up just solving the equations for both segments (from N to N + 1 and N to N-1) using the click Lat/Lng Mouse Click to determine which segment solution was closest. Not pretty but it works!! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
