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
-~----------~----~----~----~------~----~------~--~---

Reply via email to