GesturesPluginImpl

Manages gestures events on a MapView.

Constructors

GesturesPluginImpl
Link copied to clipboard
fun GesturesPluginImpl(context: Context, pixelRatio: Float)
GesturesPluginImpl
Link copied to clipboard
fun GesturesPluginImpl(context: Context, attributeSet: AttributeSet, pixelRatio: Float)

Functions

addOnFlingListener
Link copied to clipboard
open override fun addOnFlingListener(onFlingListener: OnFlingListener)

Add a callback that is invoked when the map is has received a fling gesture.

addOnMapClickListener
Link copied to clipboard
open override fun addOnMapClickListener(onMapClickListener: OnMapClickListener)

Add a callback that is invoked when the map is clicked.

addOnMapLongClickListener
Link copied to clipboard
open override fun addOnMapLongClickListener(onMapLongClickListener: OnMapLongClickListener)

Add a callback that is invoked when the map is long clicked.

addOnMoveListener
Link copied to clipboard
open override fun addOnMoveListener(onMoveListener: OnMoveListener)

Add a callback that is invoked when the map is moved.

addOnRotateListener
Link copied to clipboard
open override fun addOnRotateListener(onRotateListener: OnRotateListener)

Add a callback that is invoked when the map is rotated.

addOnScaleListener
Link copied to clipboard
open override fun addOnScaleListener(onScaleListener: OnScaleListener)

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

addOnShoveListener
Link copied to clipboard
open override fun addOnShoveListener(onShoveListener: OnShoveListener)

Add a callback that is invoked when the map is shoved.

addProtectedAnimationOwner
Link copied to clipboard
open override 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.

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

Bind the Gestures plugin with current context. This will enable the map to use the Gesture plugin.

cleanup
Link copied to clipboard
open override fun cleanup()

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

getGesturesManager
Link copied to clipboard
open override fun getGesturesManager(): AndroidGesturesManager

Get the current configured AndroidGesturesManager.

getSettings
Link copied to clipboard
abstract fun getSettings(): GesturesSettings
initialize
Link copied to clipboard
open override fun initialize()

Called when the plugin is first added to the map.

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

Provides all map delegate instances.

onGenericMotionEvent
Link copied to clipboard
open override fun onGenericMotionEvent(event: MotionEvent): Boolean

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

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

Called when the size of the MapView has changed.

onStyleChanged
Link copied to clipboard
open override fun onStyleChanged(styleDelegate: StyleInterface)

Called when new style is loaded.

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

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

removeOnFlingListener
Link copied to clipboard
open override fun removeOnFlingListener(onFlingListener: OnFlingListener)

Remove a callback that is invoked when the map is has received a fling gesture.

removeOnMapClickListener
Link copied to clipboard
open override fun removeOnMapClickListener(onMapClickListener: OnMapClickListener)

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

removeOnMapLongClickListener
Link copied to clipboard
open override fun removeOnMapLongClickListener(onMapLongClickListener: OnMapLongClickListener)

Remove a callback that is invoked when the map is long clicked.

removeOnMoveListener
Link copied to clipboard
open override fun removeOnMoveListener(listener: OnMoveListener)

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

removeOnRotateListener
Link copied to clipboard
open override fun removeOnRotateListener(listener: OnRotateListener)

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

removeOnScaleListener
Link copied to clipboard
open override fun removeOnScaleListener(listener: OnScaleListener)

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

removeOnShoveListener
Link copied to clipboard
open override fun removeOnShoveListener(listener: OnShoveListener)

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

removeProtectedAnimationOwner
Link copied to clipboard
open override fun removeProtectedAnimationOwner(owner: String)

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.

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

Set the AndroidGesturesManager instance.

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

Properties

doubleTapToZoomInEnabled
Link copied to clipboard
abstract var doubleTapToZoomInEnabled: Boolean
doubleTouchToZoomOutEnabled
Link copied to clipboard
abstract var doubleTouchToZoomOutEnabled: Boolean
focalPoint
Link copied to clipboard
abstract var focalPoint: ScreenCoordinate?
abstract var increasePinchToZoomThresholdWhenRotating: Boolean
abstract var increaseRotateThresholdWhenPinchingToZoom: Boolean
pinchScrollEnabled
Link copied to clipboard
abstract var pinchScrollEnabled: Boolean
pinchToZoomDecelerationEnabled
Link copied to clipboard
abstract var pinchToZoomDecelerationEnabled: Boolean
pinchToZoomEnabled
Link copied to clipboard
abstract var pinchToZoomEnabled: Boolean
pitchEnabled
Link copied to clipboard
abstract var pitchEnabled: Boolean
quickZoomEnabled
Link copied to clipboard
abstract var quickZoomEnabled: Boolean
rotateDecelerationEnabled
Link copied to clipboard
abstract var rotateDecelerationEnabled: Boolean
rotateEnabled
Link copied to clipboard
abstract var rotateEnabled: Boolean
scrollDecelerationEnabled
Link copied to clipboard
abstract var scrollDecelerationEnabled: Boolean
scrollEnabled
Link copied to clipboard
abstract var scrollEnabled: Boolean
scrollMode
Link copied to clipboard
abstract var scrollMode: ScrollMode
simultaneousRotateAndPinchToZoomEnabled
Link copied to clipboard
abstract var simultaneousRotateAndPinchToZoomEnabled: Boolean
zoomAnimationAmount
Link copied to clipboard
abstract var zoomAnimationAmount: Float