I need to turn on and off the listeners multiple times.
I´ll try to explain with an exemple.

I have 4 listeners.

1 - MouseOver (on marker)
2 - MouseOut (on marker)
3 - Click (on marker)
4 - ExtInfoWindowClose (on extinfowindow)

When I "mouseover" a marker I want to show an ExtInfoWindow, and when
I "mouseout" I want to hide it.

When I "click" a marker, I want to show an ExtInfoWindow, and turn of
the "mouseover" and "mouseout" listeners.

When I close the ExtInfoWindow, I want to activate the "mouseover" and
"mouseout" listeners.

How can I do this?

The "mouseover" and "mouseout" part is coded bellow, but I could not
make the on and off part. If anyone can help me with this, I would
greatly appreciate.

Thanks,
Mauricio Bolognese.



var windowMouseOver = GEvent.addListener(marker, "mouseover", function
(){
        marker.openExtInfoWindow(map, "custom_info_window");
});

var windowMouseOut = GEvent.addListener(marker, "mouseout", function()
{
        map.closeExtInfoWindow();
});

GEvent.addListener(marker, 'click', function(){
         marker.openExtInfoWindow(map, "custom_info_window");
        //code to turn off listeners
});

GEvent.addListener(map, 'extinfowindowclose', function(){
        //code to turn on listeners
});

--

You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-api?hl=en.


Reply via email to