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

doubleTapToZoomInEnabled
Link copied to clipboard

Whether double tapping the map with one touch results in a zoom-in animation.

abstract override var doubleTapToZoomInEnabled: Boolean
doubleTouchToZoomOutEnabled
Link copied to clipboard

Whether single tapping the map with two touches results in a zoom-out animation.

abstract override var doubleTouchToZoomOutEnabled: Boolean
focalPoint
Link copied to clipboard

By default, gestures rotate and zoom around the center of the gesture. Set this property to rotate and zoom around a fixed point instead.

abstract override var focalPoint: ScreenCoordinate?

Whether pinch to zoom threshold increases when rotating. true by default.

abstract override var increasePinchToZoomThresholdWhenRotating: Boolean

Whether rotate threshold increases when pinching to zoom. true by default.

abstract override var increaseRotateThresholdWhenPinchingToZoom: Boolean
pinchToZoomDecelerationEnabled
Link copied to clipboard

Whether a deceleration animation following a pinch-to-zoom gesture is enabled. True by default.

abstract override var pinchToZoomDecelerationEnabled: Boolean
pinchToZoomEnabled
Link copied to clipboard

Whether the pinch to zoom gesture is enabled.

abstract override var pinchToZoomEnabled: Boolean
pitchEnabled
Link copied to clipboard

Whether the pitch gesture is enabled.

abstract override var pitchEnabled: Boolean
quickZoomEnabled
Link copied to clipboard

Whether the quick zoom gesture is enabled.

abstract override var quickZoomEnabled: Boolean
rotateDecelerationEnabled
Link copied to clipboard

Whether a deceleration animation following a rotate gesture is enabled. True by default.

abstract override var rotateDecelerationEnabled: Boolean
rotateEnabled
Link copied to clipboard

Whether the rotate gesture is enabled.

abstract override var rotateEnabled: Boolean
scrollDecelerationEnabled
Link copied to clipboard

Whether a deceleration animation following a scroll gesture is enabled. True by default.

abstract override var scrollDecelerationEnabled: Boolean
scrollEnabled
Link copied to clipboard

Whether the single-touch scroll gesture is enabled.

abstract override var scrollEnabled: Boolean
scrollMode
Link copied to clipboard

Configures the directions in which the map is allowed to move during a scroll gesture.

abstract override var scrollMode: ScrollMode
zoomAnimationAmount
Link copied to clipboard

The amount by which the zoom level increases or decreases during a double-tap-to-zoom-in or double-touch-to-zoom-out gesture. 1.0 by default. Must be positive.

abstract override var zoomAnimationAmount: Float

Inheritors

GesturesPluginImpl
Link copied to clipboard