GesturesSettings

data class GesturesSettings @JvmOverloads() constructor(rotateEnabled: Boolean, pinchToZoomEnabled: Boolean, scrollEnabled: Boolean, pitchEnabled: Boolean, scrollMode: ScrollMode, doubleTapToZoomInEnabled: Boolean, doubleTouchToZoomOutEnabled: Boolean, quickZoomEnabled: Boolean, focalPoint: ScreenCoordinate?, pinchToZoomDecelerationEnabled: Boolean, rotateDecelerationEnabled: Boolean, scrollDecelerationEnabled: Boolean, increaseRotateThresholdWhenPinchingToZoom: Boolean, increasePinchToZoomThresholdWhenRotating: Boolean, zoomAnimationAmount: Float)

Gesture configuration allows to control the user touch interaction.

Constructors

GesturesSettings
Link copied to clipboard
fun GesturesSettings(rotateEnabled: Boolean = true, pinchToZoomEnabled: Boolean = true, scrollEnabled: Boolean = true, pitchEnabled: Boolean = true, scrollMode: ScrollMode = ScrollMode.HORIZONTAL_AND_VERTICAL, doubleTapToZoomInEnabled: Boolean = true, doubleTouchToZoomOutEnabled: Boolean = true, quickZoomEnabled: Boolean = true, focalPoint: ScreenCoordinate? = null, pinchToZoomDecelerationEnabled: Boolean = true, rotateDecelerationEnabled: Boolean = true, scrollDecelerationEnabled: Boolean = true, increaseRotateThresholdWhenPinchingToZoom: Boolean = true, increasePinchToZoomThresholdWhenRotating: Boolean = true, zoomAnimationAmount: Float = 1f)

Properties

doubleTapToZoomInEnabled
Link copied to clipboard
var doubleTapToZoomInEnabled: Boolean = true
Whether double tapping the map with one touch results in a zoom-in animation.
doubleTouchToZoomOutEnabled
Link copied to clipboard
var doubleTouchToZoomOutEnabled: Boolean = true
Whether single tapping the map with two touches results in a zoom-out animation.
focalPoint
Link copied to clipboard
var focalPoint: ScreenCoordinate? = null
By default, gestures rotate and zoom around the center of the gesture.
var increasePinchToZoomThresholdWhenRotating: Boolean = true
Whether pinch to zoom threshold increases when rotating.
var increaseRotateThresholdWhenPinchingToZoom: Boolean = true
Whether rotate threshold increases when pinching to zoom.
pinchToZoomDecelerationEnabled
Link copied to clipboard
var pinchToZoomDecelerationEnabled: Boolean = true
Whether a deceleration animation following a pinch-to-zoom gesture is enabled.
pinchToZoomEnabled
Link copied to clipboard
var pinchToZoomEnabled: Boolean = true
Whether the pinch to zoom gesture is enabled.
pitchEnabled
Link copied to clipboard
var pitchEnabled: Boolean = true
Whether the pitch gesture is enabled.
quickZoomEnabled
Link copied to clipboard
var quickZoomEnabled: Boolean = true
Whether the quick zoom gesture is enabled.
rotateDecelerationEnabled
Link copied to clipboard
var rotateDecelerationEnabled: Boolean = true
Whether a deceleration animation following a rotate gesture is enabled.
rotateEnabled
Link copied to clipboard
var rotateEnabled: Boolean = true
Whether the rotate gesture is enabled.
scrollDecelerationEnabled
Link copied to clipboard
var scrollDecelerationEnabled: Boolean = true
Whether a deceleration animation following a scroll gesture is enabled.
scrollEnabled
Link copied to clipboard
var scrollEnabled: Boolean = true
Whether the single-touch scroll gesture is enabled.
scrollMode
Link copied to clipboard
var scrollMode: ScrollMode
Configures the directions in which the map is allowed to move during a scroll gesture.
zoomAnimationAmount
Link copied to clipboard
var zoomAnimationAmount: Float = 1f
The amount by which the zoom level increases or decreases during a double-tap-to-zoom-in or double-touch-to-zoom-out gesture.

Extensions

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.