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.

class GesturesPluginImpl : GesturesSettingsBase, GesturesPlugin
OnFlingListener
Link copied to clipboard

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

fun fun interface OnFlingListener
OnMapClickListener
Link copied to clipboard

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

fun fun interface OnMapClickListener
OnMapLongClickListener
Link copied to clipboard

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

fun fun interface OnMapLongClickListener
OnMoveListener
Link copied to clipboard

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

interface OnMoveListener
OnRotateListener
Link copied to clipboard

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

interface OnRotateListener
OnScaleListener
Link copied to clipboard

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

interface OnScaleListener
OnShoveListener
Link copied to clipboard

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

interface OnShoveListener

Functions

addOnFlingListener
Link copied to clipboard

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 com.mapbox.maps.MapView as part of com.mapbox.maps.MapInitOptions.plugins.

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

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 com.mapbox.maps.MapView as part of com.mapbox.maps.MapInitOptions.plugins.

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

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 com.mapbox.maps.MapView as part of com.mapbox.maps.MapInitOptions.plugins.

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

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 com.mapbox.maps.MapView as part of com.mapbox.maps.MapInitOptions.plugins.

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

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 com.mapbox.maps.MapView as part of com.mapbox.maps.MapInitOptions.plugins.

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

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 com.mapbox.maps.MapView as part of com.mapbox.maps.MapInitOptions.plugins.

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

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 com.mapbox.maps.MapView as part of com.mapbox.maps.MapInitOptions.plugins.

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

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

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

The gesture configuration object. Gesture plugin with id = Plugin.MAPBOX_GESTURES_PLUGIN_ID must be added while constructing com.mapbox.maps.MapView as part of com.mapbox.maps.MapInitOptions.plugins.

isScrollHorizontallyLimited
Link copied to clipboard

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

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

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

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

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 com.mapbox.maps.MapView as part of com.mapbox.maps.MapInitOptions.plugins.

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

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 com.mapbox.maps.MapView as part of com.mapbox.maps.MapInitOptions.plugins.

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

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 com.mapbox.maps.MapView as part of com.mapbox.maps.MapInitOptions.plugins.

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

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 com.mapbox.maps.MapView as part of com.mapbox.maps.MapInitOptions.plugins.

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

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 com.mapbox.maps.MapView as part of com.mapbox.maps.MapInitOptions.plugins.

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

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 com.mapbox.maps.MapView as part of com.mapbox.maps.MapInitOptions.plugins.

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

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 com.mapbox.maps.MapView as part of com.mapbox.maps.MapInitOptions.plugins.

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

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

fun MapPluginExtensionsDelegate.setGesturesManager(androidGesturesManager: AndroidGesturesManager, attachDefaultListeners: Boolean, setDefaultMutuallyExclusives: Boolean)

Properties

gestures
Link copied to clipboard

Extension val for MapView to get the Gestures plugin instance.

val MapPluginProviderDelegate.gestures: GesturesPlugin