On Mar 24, 1:38 pm, 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!
Your code dump is not flickering for me. Please read and follow the group's posting guidelines: http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/2b3f101fd509919e# http://groups.google.com/group/Google-Maps-API/web/why-including-a-link-is-critical -- Marcelo - http://maps.forum.nu -- > > 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.
