I want to know when a Google Maps zoom_changed event is fired specifically by a user interaction with the +/- zoom buttons. If I use a general event listener for zoom_changed,
I wouldn't just hook in to the +
/-
buttons (or buttons on your own custom control for that matter). The user can change the zoom on the map with the mouse wheel, or by double-clicking on the map. Plus, you'd be relying on implementation detail rather than documented API, which is a major no-no.
This really means the only reliable, documented way to detect a change in zoom is to listen to the zoom_changed event of the Map
.
If your event handler can't determine whether the event came from user action or an API call, there's two approaches: