CameraAnimationsPlugin

Interface to interact with Camera Animations plugin

interface CameraAnimationsPlugin : MapPlugin

Functions

addCameraAnchorChangeListener
Link copied to clipboard

Add camera anchor change listener

abstract fun addCameraAnchorChangeListener(listener: CameraAnimatorChangeListener<ScreenCoordinate>)
addCameraAnimationsLifecycleListener
Link copied to clipboard

Add given CameraAnimationsLifecycleListener for capturing all events about animators lifecycle.

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

Add camera bearing change listener

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

Add camera center change listener

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

Add camera padding change listener

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

Add camera pitch change listener

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

Add camera zoom change listener

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

Utility method to calculate move by based on a offset screencoordinate

abstract fun calculateMoveBy(offset: ScreenCoordinate): Point?
calculateScaleBy
Link copied to clipboard

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

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

Cancel all animators except ones owned by exceptOwnerList list.

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

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

open override fun cleanup()
createAnchorAnimator
Link copied to clipboard

Create CameraAnchorAnimator

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

Create CameraBearingAnimator. Current map camera option will be applied on animation start.

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

Create CameraCenterAnimator. Current map camera option will be applied on animation start.

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

Create CameraPaddingAnimator. Current map camera option will be applied on animation start.

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

Create CameraPitchAnimator. Current map camera option will be applied on animation start.

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

Create CameraZoomAnimator

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

Ease the map camera to a given camera options.

abstract fun easeTo(cameraOptions: CameraOptions, animationOptions: MapAnimationOptions?)
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
flyTo
Link copied to clipboard

Fly the map camera to a given camera options.

This method implements an “optimal path” animation, as detailed in:

Van Wijk, Jarke J.; Nuij, Wim A. A. “Smooth and efficient zooming and panning.” INFOVIS ’03. pp. 15–22. https://www.win.tue.nl/~vanwijk/zoompan.pdf#page=5.

Where applicable, local variable documentation begins with the associated variable or function in van Wijk (2003).

abstract fun flyTo(cameraOptions: CameraOptions, animationOptions: MapAnimationOptions?)
hashCode
Link copied to clipboard
open override fun hashCode(): Int
initialize
Link copied to clipboard

Called when the plugin is first added to the map.

open override fun initialize()
moveBy
Link copied to clipboard

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

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

Provides all map delegate instances.

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

Pitch the map by with optional animation.

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

Play given ValueAnimator's sequentially

abstract fun playAnimatorsSequentially(vararg animators: Array<out ValueAnimator>)
playAnimatorsTogether
Link copied to clipboard

Play given ValueAnimator's together

abstract fun playAnimatorsTogether(vararg animators: Array<out ValueAnimator>)
registerAnimators
Link copied to clipboard

Register an animator

abstract fun registerAnimators(vararg cameraAnimators: Array<out ValueAnimator>)
removeCameraAnchorChangeListener
Link copied to clipboard

Remove camera anchor change listener

abstract fun removeCameraAnchorChangeListener(listener: CameraAnimatorChangeListener<ScreenCoordinate>)
removeCameraAnimationsLifecycleListener
Link copied to clipboard

Remove given CameraAnimationsLifecycleListener for capturing all events about animators lifecycle.

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

Add camera bearing change listener

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

Remove camera center change listener

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

Remove camera padding change listener

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

Remove camera pitch change listener

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

Remove camera zoom change listener

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

Rotate the map by with optional animation.

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

Scale the map by with optional animation.

abstract fun scaleBy(amount: Double, screenCoordinate: ScreenCoordinate?, animationOptions: MapAnimationOptions?)
toString
Link copied to clipboard
open override fun toString(): String
unregisterAnimators
Link copied to clipboard

Unregister all animators

abstract fun unregisterAnimators(vararg cameraAnimators: Array<out ValueAnimator>, cancelAnimators: Boolean)