codesite-noreply at google.com
2009-Oct-09 14:49 UTC
[Mapstraction] [mapstraction] r52 committed - silly error in hovering
Revision: 52 Author: freyfogle Date: Fri Oct 9 07:48:43 2009 Log: silly error in hovering http://code.google.com/p/mapstraction/source/detail?r=52 Modified: /trunk/source/mxn.googlev3.core.js ======================================--- /trunk/source/mxn.googlev3.core.js Fri Oct 9 07:04:05 2009 +++ /trunk/source/mxn.googlev3.core.js Fri Oct 9 07:48:43 2009 @@ -329,10 +329,18 @@ } if (this.hoverIconUrl){ - google.maps.event.addListener(marker, "mouseover", - function(){ marker.setIcon( new google.maps.MarkerImage(this.hoverIconUrl) ); }); - google.maps.event.addListener(marker, "mouseout", - function(){ marker.setIcon( new google.maps.MarkerImage(this.iconUrl) ); }); + var hIcon = this.hoverIconUrl; + var Icon = this.iconUrl; + google.maps.event.addListener( + marker, + "mouseover", + function(){ marker.setIcon(hIcon); } + ); + google.maps.event.addListener( + marker, + "mouseout", + function(){ marker.setIcon(Icon); } + ); } google.maps.event.addListener(marker, ''click'', function() {