Hi All,
I would like your thoughts on a project I am embarking on.

>From a database I will display a polyline over a highway, when the
mouse hovers over the polyline the script will return the distance
down the highway from the first point and the geocoordinates of the
point on the highway polyline. The results will display on the tooltip
or a box in the corner.

Why not get the Google API to calculate the distance? I want to avoid
having Google calculate the distance since that would involve numerous
calls to the API and be sluggish. Am I wrong in thinking this?

The approach I I'm thinking about is as follows: I will display the
polyline and dump the polyline nodes into an array. When the marker is
over the polyline, I determine which nodes of the polyline the marker
is between and calculate the distance from the node closest to the
starting node using the lat/lon. I will then calculate the distance
from the closest node to the starting node and add the values. The
result is then displayed.

Do these initial thoughts make sense? Is there a better way to achieve
the same result?

James Love




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