Package com.mapbox.maps.plugin.gestures

Types

GesturesPlugin
Link copied to clipboard

Define the interfaces for the Layer plugin.

GesturesPluginImpl
Link copied to clipboard

Manages gestures events on a MapView.

OnFlingListener
Link copied to clipboard
fun interface OnFlingListener

Interface definition for a callback to be invoked when the map is flinged.

OnMapClickListener
Link copied to clipboard
fun interface OnMapClickListener

Interface definition for a callback to be invoked when the user clicks on the map view.

OnMapLongClickListener
Link copied to clipboard
fun interface OnMapLongClickListener

Interface definition for a callback to be invoked when the user long clicks on the map view.

OnMoveListener
Link copied to clipboard
interface OnMoveListener

Interface definition for a callback to be invoked when the map is moved.

OnRotateListener
Link copied to clipboard
interface OnRotateListener

Interface definition for a callback to be invoked when the map is rotated.

OnScaleListener
Link copied to clipboard
interface OnScaleListener

Interface definition for a callback to be invoked when the map is scaled.

OnShoveListener
Link copied to clipboard
interface OnShoveListener

Interface definition for a callback to be invoked when the map is shoved with two fingers.

Functions

addOnFlingListener
Link copied to clipboard
fun MapPluginExtensionsDelegate.addOnFlingListener(onFlingListener: OnFlingListener)

Add a callback that is invoked when the map is has received a fling gesture. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

addOnMapClickListener
Link copied to clipboard
fun MapPluginExtensionsDelegate.addOnMapClickListener(onMapClickListener: OnMapClickListener)

Add a callback that is invoked when the map is clicked. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

addOnMapLongClickListener
Link copied to clipboard
fun MapPluginExtensionsDelegate.addOnMapLongClickListener(onMapLongClickListener: OnMapLongClickListener)

Add a callback that is invoked when the map is long clicked. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

addOnMoveListener
Link copied to clipboard
fun MapPluginExtensionsDelegate.addOnMoveListener(listener: OnMoveListener)

Add a callback that is invoked when the map is moved. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

addOnRotateListener
Link copied to clipboard
fun MapPluginExtensionsDelegate.addOnRotateListener(listener: OnRotateListener)

Add a callback that is invoked when the map is rotated. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

addOnScaleListener
Link copied to clipboard
fun MapPluginExtensionsDelegate.addOnScaleListener(listener: OnScaleListener)

Add a callback that is invoked when the map is scaled. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

addOnShoveListener
Link copied to clipboard
fun MapPluginExtensionsDelegate.addOnShoveListener(listener: OnShoveListener)

Add a callback that is invoked when the map is shoved. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

getGesturesManager
Link copied to clipboard
fun MapPluginExtensionsDelegate.getGesturesManager(): AndroidGesturesManager?

Get the current configured AndroidGesturesManager. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

getGesturesSettings
Link copied to clipboard

Get copy of current gesture settings.

isScrollHorizontallyLimited
Link copied to clipboard
fun GesturesSettings.isScrollHorizontallyLimited(): Boolean

Returns if the scroll is horizontally limited, In other words, the scroll mode is set to vertical.

isScrollVerticallyLimited
Link copied to clipboard
fun GesturesSettings.isScrollVerticallyLimited(): Boolean

Returns if the scroll is vertically limited, In other words, the scroll mode is set to horizontal.

removeOnFlingListener
Link copied to clipboard
fun MapPluginExtensionsDelegate.removeOnFlingListener(onFlingListener: OnFlingListener)

Remove a callback that is invoked when the map is has received a fling gesture. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

removeOnMapClickListener
Link copied to clipboard
fun MapPluginExtensionsDelegate.removeOnMapClickListener(onMapClickListener: OnMapClickListener)

Remove a callback that is invoked when the map is clicked. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

removeOnMapLongClickListener
Link copied to clipboard
fun MapPluginExtensionsDelegate.removeOnMapLongClickListener(onMapLongClickListener: OnMapLongClickListener)

Remove a callback that is invoked when the map is long clicked. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

removeOnMoveListener
Link copied to clipboard
fun MapPluginExtensionsDelegate.removeOnMoveListener(listener: OnMoveListener)

Remove a callback that is invoked when the map is moved. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

removeOnRotateListener
Link copied to clipboard
fun MapPluginExtensionsDelegate.removeOnRotateListener(listener: OnRotateListener)

Remove a callback that is invoked when the map is rotated. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

removeOnScaleListener
Link copied to clipboard
fun MapPluginExtensionsDelegate.removeOnScaleListener(listener: OnScaleListener)

Remove a callback that is invoked when the map is scaled. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

removeOnShoveListener
Link copied to clipboard
fun MapPluginExtensionsDelegate.removeOnShoveListener(listener: OnShoveListener)

Remove a callback that is invoked when the map is shoved. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

setGesturesManager
Link copied to clipboard
fun MapPluginExtensionsDelegate.setGesturesManager(androidGesturesManager: AndroidGesturesManager, attachDefaultListeners: Boolean, setDefaultMutuallyExclusives: Boolean)

Set the AndroidGesturesManager instance. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing MapView as part of MapInitOptions.plugins.

Properties

gestures
Link copied to clipboard
@get:JvmName(name = "getGestures")
val MapPluginProviderDelegate.gestures: GesturesPlugin

Extension val for MapView to get the Gestures plugin instance.