CameraAnimationsPlugin

Interface to interact with Camera Animations plugin

Functions

Link copied to clipboard

Add camera anchor change listener

Link copied to clipboard

Add given CameraAnimationsLifecycleListener for capturing all events about animators lifecycle.

Link copied to clipboard

Add camera bearing change listener

Link copied to clipboard

Add camera center change listener

Link copied to clipboard

Add camera padding change listener

Link copied to clipboard

Add camera pitch change listener

Link copied to clipboard

Add camera zoom change listener

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

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

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

Cancel all animators except ones owned by exceptOwnerList list.

Link copied to clipboard
open fun cleanup()

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

Link copied to clipboard

Create CameraAnchorAnimator

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.

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

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

Link copied to clipboard

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

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.

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

Create CameraZoomAnimator

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

Ease the map camera to a given camera options.

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

Fly the map camera to a given camera options.

Link copied to clipboard
open fun initialize()

Called when the plugin is first added to the map.

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

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

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

Provides all map delegate instances.

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

Pitch the map by with optional animation.

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

Play given ValueAnimator's sequentially

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

Play given ValueAnimator's together

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

Register an animator

Link copied to clipboard

Remove camera anchor change listener

Link copied to clipboard

Remove given CameraAnimationsLifecycleListener for capturing all events about animators lifecycle.

Link copied to clipboard

Add camera bearing change listener

Link copied to clipboard

Remove camera center change listener

Link copied to clipboard

Remove camera padding change listener

Link copied to clipboard

Remove camera pitch change listener

Link copied to clipboard

Remove camera zoom change listener

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

Rotate the map by with optional animation.

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

Scale the map by with optional animation.

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

Unregister all animators

Properties

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

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.