toggleRoute() was designed to be used on a page that has a single
directions instance. In your case you have two, so you have to tell it
which one you're talking about:
function toggleRoute(num) {
var polyline = directionsArray[num].getPolyline();
if (polyline.isHidden()) {
polyline.show();
} else {
polyline.hide();
}
}
And then call "toggleRoute(0)" or "toggleRoute(1)" when the links are
clicked.
--
Mike Williams
http://econym.org.uk/gmap
--
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.