CameraAnimationsPlugin

interface CameraAnimationsPlugin : MapPlugin

Interface to interact with Camera Animations plugin

Functions

addCameraAnchorChangeListener
Link copied to clipboard
abstract fun addCameraAnchorChangeListener(listener: CameraAnimatorNullableChangeListener<ScreenCoordinate?>)

Add camera anchor change listener

addCameraAnimationsLifecycleListener
Link copied to clipboard
abstract fun addCameraAnimationsLifecycleListener(listener: CameraAnimationsLifecycleListener)

Add given CameraAnimationsLifecycleListener for capturing all events about animators lifecycle.

addCameraBearingChangeListener
Link copied to clipboard
abstract fun addCameraBearingChangeListener(listener: CameraAnimatorChangeListener<Double>)

Add camera bearing change listener

addCameraCenterChangeListener
Link copied to clipboard
abstract fun addCameraCenterChangeListener(listener: CameraAnimatorChangeListener<Point>)

Add camera center change listener

addCameraPaddingChangeListener
Link copied to clipboard
abstract fun addCameraPaddingChangeListener(listener: CameraAnimatorChangeListener<EdgeInsets>)

Add camera padding change listener

addCameraPitchChangeListener
Link copied to clipboard
abstract fun addCameraPitchChangeListener(listener: CameraAnimatorChangeListener<Double>)

Add camera pitch change listener

addCameraZoomChangeListener
Link copied to clipboard
abstract fun addCameraZoomChangeListener(listener: CameraAnimatorChangeListener<Double>)

Add camera zoom change listener

calculateScaleBy
Link copied to clipboard
abstract fun calculateScaleBy(amount: Double, currentZoom: Double): Double

Utility method to calculate scale by using the amount and current zoom

cancelAllAnimators
Link copied to clipboard
abstract fun cancelAllAnimators(exceptOwnerList: List<String> = emptyList())

Cancel all animators except ones owned by exceptOwnerList list.

cleanup
Link copied to clipboard
open fun cleanup()

Called when the map is destroyed. Should be used to cleanup plugin resources for that map.

createAnchorAnimator
Link copied to clipboard
abstract fun createAnchorAnimator(options: CameraAnimatorOptions<ScreenCoordinate>, block: ValueAnimator.() -> Unit? = null): ValueAnimator

Create CameraAnchorAnimator

createBearingAnimator
Link copied to clipboard
abstract fun createBearingAnimator(options: CameraAnimatorOptions<Double>, useShortestPath: Boolean = true, block: ValueAnimator.() -> Unit? = null): ValueAnimator

Create CameraBearingAnimator. Current map camera option will be applied on animation start if not specified explicitly with options.startValue.

createCenterAnimator
Link copied to clipboard
abstract fun createCenterAnimator(options: CameraAnimatorOptions<Point>, block: ValueAnimator.() -> Unit? = null): ValueAnimator

Create CameraCenterAnimator. Current map camera option will be applied on animation start if not specified explicitly with options.startValue.

createPaddingAnimator
Link copied to clipboard
abstract fun createPaddingAnimator(options: CameraAnimatorOptions<EdgeInsets>, block: ValueAnimator.() -> Unit? = null): ValueAnimator

Create CameraPaddingAnimator. Current map camera option will be applied on animation start if not specified explicitly with options.startValue.

createPitchAnimator
Link copied to clipboard
abstract fun createPitchAnimator(options: CameraAnimatorOptions<Double>, block: ValueAnimator.() -> Unit? = null): ValueAnimator

Create CameraPitchAnimator. Current map camera option will be applied on animation start if not specified explicitly with options.startValue.

createZoomAnimator
Link copied to clipboard
abstract fun createZoomAnimator(options: CameraAnimatorOptions<Double>, block: ValueAnimator.() -> Unit? = null): ValueAnimator

Create CameraZoomAnimator

easeTo
Link copied to clipboard
abstract fun easeTo(cameraOptions: CameraOptions, animationOptions: MapAnimationOptions? = null): Cancelable

Ease the map camera to a given camera options.

flyTo
Link copied to clipboard
abstract fun flyTo(cameraOptions: CameraOptions, animationOptions: MapAnimationOptions? = null): Cancelable

Fly the map camera to a given camera options.

initialize
Link copied to clipboard
open fun initialize()

Called when the plugin is first added to the map.

moveBy
Link copied to clipboard
abstract fun moveBy(screenCoordinate: ScreenCoordinate, animationOptions: MapAnimationOptions? = null): Cancelable

Move the map by a given screen coordinate with optional animation.

onDelegateProvider
Link copied to clipboard
open fun onDelegateProvider(delegateProvider: MapDelegateProvider)

Provides all map delegate instances.

pitchBy
Link copied to clipboard
abstract fun pitchBy(pitch: Double, animationOptions: MapAnimationOptions? = null): Cancelable

Pitch the map by with optional animation.

playAnimatorsSequentially
Link copied to clipboard
abstract fun playAnimatorsSequentially(vararg animators: ValueAnimator)

Play given ValueAnimator's sequentially

playAnimatorsTogether
Link copied to clipboard
abstract fun playAnimatorsTogether(vararg animators: ValueAnimator)

Play given ValueAnimator's together

registerAnimators
Link copied to clipboard
abstract fun registerAnimators(vararg cameraAnimators: ValueAnimator)

Register an animator

removeCameraAnchorChangeListener
Link copied to clipboard

Remove camera anchor change listener

removeCameraAnimationsLifecycleListener
Link copied to clipboard
abstract fun removeCameraAnimationsLifecycleListener(listener: CameraAnimationsLifecycleListener)

Remove given CameraAnimationsLifecycleListener for capturing all events about animators lifecycle.

removeCameraBearingChangeListener
Link copied to clipboard
abstract fun removeCameraBearingChangeListener(listener: CameraAnimatorChangeListener<Double>)

Add camera bearing change listener

removeCameraCenterChangeListener
Link copied to clipboard
abstract fun removeCameraCenterChangeListener(listener: CameraAnimatorChangeListener<Point>)

Remove camera center change listener

removeCameraPaddingChangeListener
Link copied to clipboard
abstract fun removeCameraPaddingChangeListener(listener: CameraAnimatorChangeListener<EdgeInsets>)

Remove camera padding change listener

removeCameraPitchChangeListener
Link copied to clipboard
abstract fun removeCameraPitchChangeListener(listener: CameraAnimatorChangeListener<Double>)

Remove camera pitch change listener

removeCameraZoomChangeListener
Link copied to clipboard
abstract fun removeCameraZoomChangeListener(listener: CameraAnimatorChangeListener<Double>)

Remove camera zoom change listener

rotateBy
Link copied to clipboard
abstract fun rotateBy(first: ScreenCoordinate, second: ScreenCoordinate, animationOptions: MapAnimationOptions? = null): Cancelable

Rotate the map by with optional animation.

scaleBy
Link copied to clipboard
abstract fun scaleBy(amount: Double, screenCoordinate: ScreenCoordinate?, animationOptions: MapAnimationOptions? = null): Cancelable

Scale the map by with optional animation.

unregisterAnimators
Link copied to clipboard
abstract fun unregisterAnimators(vararg cameraAnimators: ValueAnimator, cancelAnimators: Boolean = true)

Unregister all animators

Properties

anchor
Link copied to clipboard
abstract var anchor: ScreenCoordinate?

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).

debugMode
Link copied to clipboard
abstract var debugMode: Boolean

If debug mode is enabled extra logs will be written about animation lifecycle and some other events that may be useful for debugging.

Inheritors

CameraAnimationsPluginImpl
Link copied to clipboard