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
type
type of gesture to disable.
completionHandler
A 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
options
Drag to pan options (optional).
completionHandler
A 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
completionHandler
A 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
completionHandler
A 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
completionHandler
A 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) async
Parameters
type
type of gesture to disable.
-
enableDragPanGesture(options:
Asynchronous) Enables drag to pan gesture.
Declaration
Swift
@MainActor public func enableDragPanGesture(options: MTDragPanOptions? = nil) async
Parameters
options
Drag 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