Anyone??
I am still searching for this functionality.
What i found so far:
- triggering the mouseclick does not generate the onclick event of the
line.
- custom code exists for checking if a point is IN a polygon, but I
havent found any that check whether the point would be ON a polyLINE.
Suggestions are much appreciated!
Regards,
Henk
On Oct 16, 12:28 pm, CourseMapper <[EMAIL PROTECTED]> wrote:
> At my site (www.coursemapper.com/coursemapper.htm) I am creating a
> network of lines for display on GPS devices.
> When users create the maplines by hand, they will generate mouseclicks
> so in such case i use the GPolylines click event to listen if I should
> insert a point between two existing points.
>
> However, I have recently added a "Follow roads" option to add multiple
> points using the GDirections service.
> On the "load" of the GDirections service I am generating the
> intermediate points using javascript code..
>
> Now the problem is that when a Gpolyline already existed at the point
> where i am adding the new points, i will end up with a very heavy map
> with multiple lines displayed on top of eachother.. Therefor i want to
> check whether the point that i am adding is above an existing
> GPolyline.. That way i can insert the new point to the existing line
> instead of adding a duplicate line.
>
> So it would be wonderfull if something existed, or could be
> programmed, like,
>
> function getPolylineUnderLatLng(LatLng)
>
> the function would have to return the GPolyline which the "latlng" is
> above, or false if no line is underneath.
>
> I would like to use it as follows:
>
> var existingline = getPolylineUnderLatLng(LatLng);
> if (existingline){
> ..do insert the point to existing line} else {
>
> .. do add the point separately
>
> }
>
> Any thoughts or help with how i could check if the LatLng point is
> above a Gpolyline and which one it is would be appreciated.
> (Note, i am using lines with only a start and end point, so i do not
> necesarily need the vertex to be returned.)
>
> Thanks a lot in advance!
> Regards,
>
> Henk
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---