Hi All,
I am trying to grab the polyline from a Gdirections call and encode
it. This method in the code snippet works but it is very slow for long
distances. I pass the points to the HTML so I can get the polyline to
the server side to run DP and Encoding on it. I realized that perhaps
I can just pass the encoded polyline to the server, but was not sure
how to do this. Any thoughts or am I just stuck with grabbing each
Vertex and re-encoding on the server side?
for (var i=0; i< gdir.getPolyline().getVertexCount(); i++) {
var point = gdir.getPolyline().getVertex(i);
document.getElementById("polyline").value
+=point.lat().toFixed(6)+","+point.lng().toFixed(6)+"|";
}
Thanks,
James Love
Vernon, Canada
www.jameslove.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---