GesturesPlugin

Define the interfaces for the Layer plugin.

Functions

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.

Link copied to clipboard
abstract fun bind(context: Context, attrs: AttributeSet?, pixelRatio: Float)

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

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
abstract fun getGesturesManager(): AndroidGesturesManager

Get the current configured gesture manager

Link copied to clipboard

Get current gestures configuration.

Link copied to clipboard
open fun initialize()

Called when the plugin is first added to the map.

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

Provides all map delegate instances.

Link copied to clipboard

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

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

Invoked when MapView's width and height have changed.

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

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

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

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

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

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

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

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

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

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

Link copied to clipboard

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

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

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

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

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

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.

Link copied to clipboard
abstract fun setGesturesManager(internalGesturesManager: AndroidGesturesManager, attachDefaultListeners: Boolean, setDefaultMutuallyExclusives: Boolean)

Set internal gesture manager

Link copied to clipboard
abstract fun updateSettings(block: GesturesSettings.Builder.() -> Unit)

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

Properties

Link copied to clipboard

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

Link copied to clipboard

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

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.

Link copied to clipboard

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

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

Link copied to clipboard

Whether pan is enabled for the pinch gesture.

Link copied to clipboard

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

Link copied to clipboard

Whether the pinch to zoom gesture is enabled.

Link copied to clipboard
abstract var pitchEnabled: Boolean

Whether the pitch gesture is enabled.

Link copied to clipboard

Whether the quick zoom gesture is enabled.

Link copied to clipboard

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

Link copied to clipboard
abstract var rotateEnabled: Boolean

Whether the rotate gesture is enabled.

Link copied to clipboard

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

Link copied to clipboard
abstract var scrollEnabled: Boolean

Whether the single-touch scroll gesture is enabled.

Link copied to clipboard
abstract var scrollMode: ScrollMode

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

Link copied to clipboard

Whether rotation is enabled for the pinch to zoom gesture.

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.