Here's what I tried:
google.maps.event.addListener(marker, "mouseover", function() {
this.old_ZIndex = this.getZIndex();
console.log(this.old_ZIndex); //<<<<<<---this is undefined, why?
this.setZIndex(1000);
});
google.maps.event.addListener(marker, "mouseout", function() {
if (this.old_ZIndex)
this.setZIndex(this.old_ZIndex);
});
I reported it as an issue (http://code.google.com/p/gmaps-api-issues/
issues/detail?id=2150), but they told me this is the desired
behaviour.
Setting a default ZIndex is not an option, since I don't want to lose
the default behaviour (By default, Markers are displayed according to
their latitude, with Markers of lower latitudes appearing in front of
Markers at higher latitudes.)
How can I solve this?
marker.setZIndex(999); //hover
marker.setZIndex(undefined); //undo
Chad Killingsworth
On Mar 15, 4:40 am, Chad Killingsworth
Chad Killingsworth