Polyline mouseover event seems to work great in all the browsers.
So here is the code how I created the Markers and how the mouseover
events are created (just copy the following code to a good text editor
to get the tab formatting correct):
CreateStopMarkerMouseEvent : function(stopMarker, currentRoutePattern)
{ var currentPolyline = currentRoutePattern.Polyline;
var originalPolylineColor = currentPolyline.strokeColor;
var originalPolylineOpacity = currentPolyline.strokeOpacity;
var hilitedLineColor = this.m_highlitePatternColor;
var originalZindex = currentPolyline.zIndex;
google.maps.event.addListener(stopMarker,
"mouseover",
function()
{ currentPolyline.setOptions({strokeColor: hilitedLineColor,
strokeOpacity: .8, zIndex: 999});
}
);
google.maps.event.addListener(stopMarker,
"mouseout",
function()
{ currentPolyline.setOptions({strokeColor:
originalPolylineColor, strokeOpacity: originalPolylineOpacity, zIndex:
originalZindex});
}
);
},
CreateMarkers : function(markerList, currentRoutePattern)
{ var markerImage = new google.maps.MarkerImage("../Images/
bus.png",
new google.maps.Size(32, 37), //This marker is 32 pixels
wide by 37 pixels tall.
new google.maps.Point(0,0), // The origin for this
markerImage is 0,0.
new google.maps.Point(12, 27), // The anchor for this
markerImage is the base at 16,37.
new google.maps.Size(24, 27)); //Scaled size of the
markerImage
var markerShape = {coord: [0, 32, 37,0], type: "poly"};
var markers = [];
for(var i in markerList)
{ var marker = new google.maps.Marker({position: new
google.maps.LatLng(markerList[i].LatLong.Latitude,
markerList[i].LatLong.Longitude),
//map: this.m_map,
icon: markerImage,
shape: markerShape,
title: markerList[i].Title});
markers.push(marker);
//Create the event handling for mouse-over the marker
this.CreateStopMarkerMouseEvent(marker, currentRoutePattern);
}
currentRoutePattern.Markers = markers; //push the markers into the
routePatter item
return currentRoutePattern;
},
> > work?- Hide quoted text -
>
> - Show quoted text -