Gesture Scope
Receiver scope for registering gesture listeners on a MapboxMap.
Each detect* function registers the corresponding listener, suspends until the coroutine is canceled, and then automatically removes the listener. Call multiple detect* functions concurrently (e.g. with kotlinx.coroutines.coroutineScope) to observe several gesture types at once.
Functions
Link copied to clipboard
Registers an OnFlingListener and suspends until cancellation.
Link copied to clipboard
suspend fun detectMoveGestures(onMoveBegin: (MoveGestureDetector) -> Unit = {}, onMoveEnd: (MoveGestureDetector) -> Unit = {}, onMove: (MoveGestureDetector) -> Boolean = { false })
Registers an OnMoveListener and suspends until cancellation.
Link copied to clipboard
suspend fun detectRotateGestures(onRotateBegin: (RotateGestureDetector) -> Unit = {}, onRotateEnd: (RotateGestureDetector) -> Unit = {}, onRotate: (RotateGestureDetector) -> Unit = {})
Registers an OnRotateListener and suspends until cancellation.
Link copied to clipboard
suspend fun detectScaleGestures(onScaleBegin: (StandardScaleGestureDetector) -> Unit = {}, onScaleEnd: (StandardScaleGestureDetector) -> Unit = {}, onScale: (StandardScaleGestureDetector) -> Unit = {})
Registers an OnScaleListener and suspends until cancellation.
Link copied to clipboard
suspend fun detectShoveGestures(onShoveBegin: (ShoveGestureDetector) -> Unit = {}, onShoveEnd: (ShoveGestureDetector) -> Unit = {}, onShove: (ShoveGestureDetector) -> Unit = {})
Registers an OnShoveListener and suspends until cancellation.