Search code examples
androidgoogle-mapsgoogle-maps-mobilegoogle-maps-android-api-2

zoom level listener in google maps v2 in android


I'm developing an Android app that is supposed to use Google Maps v2. Now i'm stuck at finding when zoom level of map has changed. Can anyone help me?Thanks in advance.


Solution

  • Create an implementation of OnCameraChangeListener, and pass an instance of it to setOnCameraChangeListener() of your GoogleMap. Your listener should be called with onCameraChange() whenever the user changes the zoom, center, or tilt. You find out the new zoom level from the CameraPosition object that you are passed.