AI-generated Key Takeaways
-
GoogleMap.OnCameraMoveStartedListener is a callback interface for when the camera motion starts on a Google Map.
-
The
onCameraMoveStartedmethod is called when the camera begins moving, providing a reason for the camera change. -
Possible reasons for camera movement include user gestures, default API animations, and developer-initiated animations, represented by
REASON_GESTURE,REASON_API_ANIMATION, andREASON_DEVELOPER_ANIMATIONconstants respectively. -
You should not update or animate the camera from within the
onCameraMoveStartedmethod.
Callback interface for when the camera motion starts.
Constant Summary
| int | REASON_API_ANIMATION | Non-gesture animation initiated in response to user actions. |
| int | REASON_DEVELOPER_ANIMATION | Developer initiated animation. |
| int | REASON_GESTURE | Camera motion initiated in response to user gestures on the map. |
Public Method Summary
| abstract void |
onCameraMoveStarted(int reason)
Called when the camera starts moving after it has been idle or when the reason
for camera motion has changed.
|
Constants
public static final int REASON_API_ANIMATION
Non-gesture animation initiated in response to user actions. For example: zoom buttons, my location button, or marker clicks.
public static final int REASON_DEVELOPER_ANIMATION
Developer initiated animation.
public static final int REASON_GESTURE
Camera motion initiated in response to user gestures on the map. For example: pan, tilt, pinch to zoom, or rotate.
Public Methods
public abstract void onCameraMoveStarted (int reason)
Called when the camera starts moving after it has been idle or when the reason for camera motion has changed. Do not update or animate the camera from within this method.
This is called on the Android UI thread.
Parameters
| reason |
The reason for the camera change. Possible values:
|
|---|