Do not fire 'zoom_changed' event when fitbounds() is in used

317 Views Asked by At

In my init i have some thing like this

google.maps.event.addListener(gmap, 'zoom_changed', function(){
    GMapPlot.getSwNe(window.gmap.getBounds());
    //GMapPlot.rePlotMap(presentPlaceType);
});

and at some point i have gmap.fitBounds(GMapPlot.markerBounds);, my question is fitBounds fires a zoom_changed event that intern invokes the bound method, i don't want this to happen, is there a way to do that. If i try to clearListener for zoom_changed event before that fitBounds is not working.

0

There are 0 best solutions below