Jens, did you ever find a solution to this? I have the same issue when applying a hover icon. For me it happens on some machines / browsers not on others, so I'm not sure if it's a performance issue, or a compatibility issue... or.
(thanks for the constructive help marcelo) ~ Anders On Mar 24, 2:38 am, Jens <[email protected]> wrote: > I got a problem with a slight flicker in map markers when changing > them on mouserOver/mouseOut. The code works as expected (the marker > changes colour on mouseOver and then back to the old colour on > mouseOut) the problem is the slight flicker of the marker image. > > I am unfortunently not able to post this on any external site at the > moment since its work in development but I've posted the actual code > below. Any input at all is appreciated! > > Best regards Jens > > CODE: > > //MarkerImage > var hotelPointer = new google.maps.MarkerImage("/nyabilder/gicons/ > blue_pin4.png", > new > google.maps.Size(26, 26), > new > google.maps.Point(0,0), > new > google.maps.Point(6, 25)); > > // Marker > var marker = new google.maps.Marker({ > position: myLatLng, > map: map, > title: hotel[0], > icon: hotelPointer, > visible: true > > }); > > Then I add a listener to it: > google.maps.event.addListener(marker, 'mouseover', function() { > this.setIcon(new google.maps.MarkerImage("/nyabilder/gicons/ > red_pin4.png", > new google.maps.Size(26, > 26), > new > google.maps.Point(0,0), > new google.maps.Point(6, > 25))); > > }); > > and a similar mouseout listener setting the icon to the original > image: > google.maps.event.addListener(marker, 'mouseout', function() { > this.setIcon(new google.maps.MarkerImage("/nyabilder/gicons/ > blue_pin4.png", > new google.maps.Size(26, > 26), > new > google.maps.Point(0,0), > new google.maps.Point(6, > 25))); > > > > }); -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
