GesturesPlugin

Define the interfaces for the Layer plugin.

Functions

addOnFlingListener
Link copied to clipboard

Add a fling gesture listener that is invoked when a map is flinged

abstract fun addOnFlingListener(onFlingListener: OnFlingListener)
addOnMapClickListener
Link copied to clipboard

Add a map click listener that is invoked when a map is clicked.

abstract fun addOnMapClickListener(onMapClickListener: OnMapClickListener)
addOnMapLongClickListener
Link copied to clipboard

Add a map long click listener that is invoked when a map is clicked.

abstract fun addOnMapLongClickListener(onMapLongClickListener: OnMapLongClickListener)
addOnMoveListener
Link copied to clipboard

Add a move gesture listener that is invoked when a map is moved

abstract fun addOnMoveListener(onMoveListener: OnMoveListener)
addOnRotateListener
Link copied to clipboard

Add a rotation gesture listener that is invoked when a map is rotated

abstract fun addOnRotateListener(onRotateListener: OnRotateListener)
addOnScaleListener
Link copied to clipboard

Add a scale gesture listener that is invoked when a map is scaled

abstract fun addOnScaleListener(onScaleListener: OnScaleListener)
addOnShoveListener
Link copied to clipboard

Add a shove gesture listener tha is invoked when a map is shoved

abstract fun addOnShoveListener(onShoveListener: OnShoveListener)
addProtectedAnimationOwner
Link copied to clipboard

Add animator owner (see CameraAnimatorOptions.owner or MapAnimationOptions.owner which animation will not be canceled with when gesture animation is about to start. When specified, you are responsible for listening to gesture interactions and canceling the specified owners' animations to avoid competing with gestures.

abstract fun addProtectedAnimationOwner(owner: String)
bind
Link copied to clipboard

Bind the ViewPlugin with current map context. This will create a View that will be added to the MapView.

abstract override fun bind(context: Context, attrs: AttributeSet?, pixelRatio: Float)
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()
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getGesturesManager
Link copied to clipboard

Get the current configured gesture manager

abstract fun getGesturesManager(): AndroidGesturesManager
getSettings
Link copied to clipboard

Get current gestures configuration.

abstract override fun getSettings(): GesturesSettings
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()
onDelegateProvider
Link copied to clipboard

Provides all map delegate instances.

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

Called for events that don't fit the other handlers.

Examples of such events are mouse scroll events, mouse moves, joystick & trackpad.

abstract fun onGenericMotionEvent(event: MotionEvent): Boolean
onSizeChanged
Link copied to clipboard

Invoked when MapView's width and height have changed.

open override fun onSizeChanged(width: Int, height: Int)
onTouchEvent
Link copied to clipboard

Called when user touches the screen, all positions are absolute.

Forwards event to the related gesture detectors.

abstract fun onTouchEvent(motionEvent: MotionEvent?): Boolean
removeOnFlingListener
Link copied to clipboard

Remove a fling gesture listener that is invoked when a map is flinged

abstract fun removeOnFlingListener(onFlingListener: OnFlingListener)
removeOnMapClickListener
Link copied to clipboard

Remove a map click listener that is invoked when a map is clicked.

abstract fun removeOnMapClickListener(onMapClickListener: OnMapClickListener)
removeOnMapLongClickListener
Link copied to clipboard

Add a map long click listener that is invoked when a map is clicked.

abstract fun removeOnMapLongClickListener(onMapLongClickListener: OnMapLongClickListener)
removeOnMoveListener
Link copied to clipboard

Remove a move gesture listener that is invoked when a map is moved

abstract fun removeOnMoveListener(listener: OnMoveListener)
removeOnRotateListener
Link copied to clipboard

Remove a rotate gesture listener that is invoked when a map is rotated

abstract fun removeOnRotateListener(listener: OnRotateListener)
removeOnScaleListener
Link copied to clipboard

Remove a callback that is invoked when the map is scaled.

abstract fun removeOnScaleListener(listener: OnScaleListener)
removeOnShoveListener
Link copied to clipboard

Remove a shove gesture listener that is invoked wen a map is shoved

abstract fun removeOnShoveListener(listener: OnShoveListener)
removeProtectedAnimationOwner
Link copied to clipboard

Remove animator owner (see CameraAnimatorOptions.owner or MapAnimationOptions.owner) which animation will not be canceled with when gesture animation is about to start. When specified, you are responsible for listening to gesture interactions and canceling the specified owners' animations to avoid competing with gestures.

abstract fun removeProtectedAnimationOwner(owner: String)
setGesturesManager
Link copied to clipboard

Set internal gesture manager

abstract fun setGesturesManager(internalGesturesManager: AndroidGesturesManager, attachDefaultListeners: Boolean, setDefaultMutuallyExclusives: Boolean)
toString
Link copied to clipboard
open override fun toString(): String
updateSettings
Link copied to clipboard

Update gestures configuration, the update will be applied to the plugin automatically.

abstract override fun updateSettings(block: GesturesSettings.() -> Unit)

Properties

disableRotateWhenScaling
Link copied to clipboard

Whether rotate is disabled when scaling. true by default.

abstract override var disableRotateWhenScaling: Boolean
doubleTapToZoomEnabled
Link copied to clipboard

Whether double tapping the map results in a zoom gesture.

abstract override var doubleTapToZoomEnabled: Boolean
flingVelocityAnimationEnabled
Link copied to clipboard

Whether fling velocity animations are enabled, true by default.

abstract override var flingVelocityAnimationEnabled: Boolean
focalPoint
Link copied to clipboard

Whether a gesture executes around a fixed focal point or the center of the gesture.

abstract override var focalPoint: ScreenCoordinate?
increaseRotateThresholdWhenScaling
Link copied to clipboard

Whether rotate threshold increases when scaling. true by default.

abstract override var increaseRotateThresholdWhenScaling: Boolean
increaseScaleThresholdWhenRotating
Link copied to clipboard

Whether scale threshold increases when rotating. true by default.

abstract override var increaseScaleThresholdWhenRotating: Boolean
pitchEnabled
Link copied to clipboard

Whether pitch gestures are enabled.

abstract override var pitchEnabled: Boolean
pixelRatio
Link copied to clipboard

The pixel ratio of the device that the gestures will take in account.

abstract override var pixelRatio: Float
quickZoomEnabled
Link copied to clipboard

Whether quick zoom gesture is enabled.

abstract override var quickZoomEnabled: Boolean
rotateEnabled
Link copied to clipboard

Whether rotation gestures are enabled.

abstract override var rotateEnabled: Boolean
rotateVelocityAnimationEnabled
Link copied to clipboard

Whether rotate velocity animations are enabled, true by default.

abstract override var rotateVelocityAnimationEnabled: Boolean
scaleVelocityAnimationEnabled
Link copied to clipboard

Whether scale velocity animations are enabled, true by default.

abstract override var scaleVelocityAnimationEnabled: Boolean
scrollEnabled
Link copied to clipboard

Whether scroll gestures are enabled.

abstract override var scrollEnabled: Boolean
zoomEnabled
Link copied to clipboard

Whether zoom gestures are enabled.

abstract override var zoomEnabled: Boolean
zoomRate
Link copied to clipboard

The rate at which the zoom level increases. 1.0 by default

abstract override var zoomRate: Float

Inheritors

GesturesPluginImpl
Link copied to clipboard