How do display in the distance between two markers, using small
tooltip that follows mouse when over polyline between these markers?
I know how to create tooltip over simple polyline.
Some pseudocode:
dir is my GDirections object.
GEvent.addListener(dir, 'load', function()
{
setTimeout(function()
{
for(var i = 0; i < dir.getNumRoutes() + 1; i++)
{
var marker = dir.getMarker(i);
map.removeOverlay(marker);
}
}, 0);
var line = dir.getPolyline();
line.color = '#FF0000';
GEvent.addListener(line, 'mouseout', function()
{
// display tooltip - should i use
setTimeout to refresh coords?
});
});
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---