the polyline. You could do something similar by finding the nearest
On Dec 28, 9:35 am, Marcelo <
marcelo...@hotmail.com> wrote:
> 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
>
> --