Catch bounds_changed event when user moves the map but not the setCenter method
问题 I want to listen 'bounds_changed' event when the user moves the map, changes the zoom but I don't want it to be fired when my program calls setCenter or setZoom methods. So I tried removing event before setting center and adding it after, again. However, it didn't worked, My event is still being fired. var currentBoundsListener = null; function addBoundsChangedListener() { currentBoundsListener = google.maps.event.addListener(map, 'bounds_changed', function () { // Whatever. }); } function