MTGestureService
@MainActor
public class MTGestureService
Service responsible for gesture handling and state.
-
List of the enabled gestures on the map.
Declaration
Swift
@MainActor public private(set) var enabledGestures: [MTGestureType : MTGesture] { get } -
Removes the gesture with the provided type from the map.
Declaration
Swift
@available(iOS, deprecated: 16.0, message: "Prefer the async version for modern concurrency handling") @MainActor public func disableGesture(with type: MTGestureType, completionHandler: ((Result<Void, MTError>) -> Void)? = nil)Parameters
typetype of gesture to disable.
completionHandlerA handler block to execute when function finishes.
-
Enables drag to pan gesture.
Declaration
Swift
@available(iOS, deprecated: 16.0, message: "Prefer the async version for modern concurrency handling") @MainActor public func enableDragPanGesture( options: MTDragPanOptions? = nil, completionHandler: ((Result<Void, MTError>) -> Void)? = nil )Parameters
optionsDrag to pan options (optional).
completionHandlerA handler block to execute when function finishes.
-
Enables pinch to rotate and zoom gesture.
Declaration
Swift
@available(iOS, deprecated: 16.0, message: "Prefer the async version for modern concurrency handling") @MainActor public func enablePinchRotateAndZoomGesture(completionHandler: ((Result<Void, MTError>) -> Void)? = nil)Parameters
completionHandlerA handler block to execute when function finishes.
-
Enables two fingers drag pitch gesture.
Declaration
Swift
@available(iOS, deprecated: 16.0, message: "Prefer the async version for modern concurrency handling") @MainActor public func enableTwoFingerDragPitchGesture(completionHandler: ((Result<Void, MTError>) -> Void)? = nil) -
Enables double tap zoom in gesture.
Declaration
Swift
@available(iOS, deprecated: 16.0, message: "Prefer the async version for modern concurrency handling") @MainActor public func enableDoubleTapZoomInGesture(completionHandler: ((Result<Void, MTError>) -> Void)? = nil)Parameters
completionHandlerA handler block to execute when function finishes.
-
Sets the double tap sensitivity level (i.e. required time between taps).
Note
Default: 0.4Declaration
Swift
@MainActor public func setDoubleTapSensitivity(_ sensitivity: Double)Parameters
completionHandlerA handler block to execute when function finishes.
-
disableGesture(with:Asynchronous) Removes the gesture with the provided type from the map.
Declaration
Swift
@MainActor public func disableGesture(with type: MTGestureType) asyncParameters
typetype of gesture to disable.
-
enableDragPanGesture(options:Asynchronous) Enables drag to pan gesture.
Declaration
Swift
@MainActor public func enableDragPanGesture(options: MTDragPanOptions? = nil) asyncParameters
optionsDrag to pan options (optional).
-
enablePinchRotateAndZoomGesture()AsynchronousEnables pinch to rotate and zoom gesture.
Declaration
Swift
@MainActor public func enablePinchRotateAndZoomGesture() async -
enableTwoFingerDragPitchGesture()AsynchronousEnables two fingers drag pitch gesture.
Declaration
Swift
@MainActor public func enableTwoFingerDragPitchGesture() async -
enableDoubleTapZoomInGesture()AsynchronousEnables double tap zoom in gesture.
Declaration
Swift
@MainActor public func enableDoubleTapZoomInGesture() async