On Dec 28, 3:22 am, massimo bastianon <bastian...@gmail.com> wrote:
>
> Is there a way to get index of a point inside a polyline?
>

A polyline, (for example of a single straight line), has only two
points in its path array, (the two end points). Everything in between
is calculated, and there is an infinite number of points between the
mouse and the line and between the two end points. You'd have to be
very lucky to hit exactly the lat/lon of an end point.
What you might need to do is to calculate the distance to the nearest
point with a threshold, like this V2 example:
http://maps.forum.nu/gm_mouse_dist_to_line.html

--
Marcelo - http://maps.forum.nu
--





> a sample here:http://www.pedemontanadelgrappa.it/fu.html
> Move the mouse over the polyline. Alert is on line 130.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to