Camera Animations Plugin Impl
CameraAnimationsPluginImpl is designed to rule all the animations happening to the map driven by changing CameraOptions. It is responsible for:
Storing all the ValueAnimator's that could be run. Only specific camera animators could be used in this plugin.
Controlling animation execution - only one ValueAnimator of certain type could be run at a time. If some another animation with same CameraAnimator.type is about to start previous one will be cancelled.
Giving possibility to listen to CameraOptions values changes during animations via listeners.
If several animations of different CameraAnimator.type are running simultaneously map camera will be updated only on oldest animation update (the oldest is the one that was started first). That actually means that animation start order matters. High-level animations flyTo and easeTo will always trigger camera center animator first.
CameraAnimationsPluginImpl is NOT thread-safe meaning all animations must be started from one thread. However, it doesn't have to be the UI thread.
Constructors
Types
Functions
Add CameraAnimatorNullableChangeListener to receive map anchor updates.
Add given CameraAnimationsLifecycleListener for capturing all events about animators lifecycle.
Add CameraAnimatorChangeListener to receive map bearing updates.
Add CameraAnimatorChangeListener to receive map center updates.
Add CameraAnimatorChangeListener to receive map padding updates.
Add CameraAnimatorChangeListener to receive map pitch updates.
Add CameraAnimatorChangeListener to receive map zoom updates.
Calculate target zoom by applying scale
Cancel all animators except ones owned by exceptOwnerList list.
Create CameraAnchorAnimator
Create CameraBearingAnimator. Current map camera option will be applied on animation start if not specified explicitly with options.startValue.
Create CameraCenterAnimator. Current map camera option will be applied on animation start if not specified explicitly with options.startValue.
Create CameraPaddingAnimator. Current map camera option will be applied on animation start if not specified explicitly with options.startValue.
Create CameraPitchAnimator. Current map camera option will be applied on animation start if not specified explicitly with options.startValue.
Create CameraZoomAnimator
Ease the map camera to a given camera options and animation options.
Fly the map camera to a given camera options.
Move the map by a given screen coordinate with optional animation.
Called whenever camera position changes.
Provides all map delegate instances.
Pitch the map by with optional animation.
Play given ValueAnimator's sequentially
Play given ValueAnimator's together
Register given ValueAnimator's. Such ValueAnimator's must be created with static methods like CameraAnimationsPlugin.createCenterAnimator or similar. Only registered animations affect MapboxMap and would not even start otherwise.
Remove CameraAnimatorNullableChangeListener. No updates will arrive after that.
Remove given CameraAnimationsLifecycleListener for capturing all events about animators lifecycle.
Remove CameraAnimatorChangeListener. No updates will arrive after that.
Remove CameraAnimatorChangeListener. No updates will arrive after that.
Remove CameraAnimatorChangeListener. No updates will arrive after that.
Remove CameraAnimatorChangeListener. No updates will arrive after that.
Remove CameraAnimatorChangeListener. No updates will arrive after that.
Rotate the map by with optional animation.
Scale the map by with optional animation.
Unregister all previously registered ValueAnimator's.
Unregister given ValueAnimator's.
Properties
Map camera anchor value. Default value is NULL meaning center of given map view. Left-top corner is represented as ScreenCoordinate (0.0, 0.0).