GestureOptions

public struct GestureOptions : Equatable

Configuration options for the built-in gestures

  • Whether the single-touch pan gesture is enabled.

    Defaults to true.

    Declaration

    Swift

    public var panEnabled: Bool
  • Whether the pinch gesture is enabled. Allows panning, rotating, and zooming.

    Defaults to true.

    Declaration

    Swift

    public var pinchEnabled: Bool
  • Whether rotation is enabled for the pinch gesture.

    Defaults to true.

    Declaration

    Swift

    @available(*, deprecated, renamed: "rotateEnabled")
    public var pinchRotateEnabled: Bool { get set }
  • Whether rotation gesture is enabled.

    Defaults to true.

    Declaration

    Swift

    public var rotateEnabled: Bool
  • Whether rotation is enabled for the pinch to zoom gesture.

    Defaults to true.

    Declaration

    Swift

    public var simultaneousRotateAndPinchZoomEnabled: Bool
  • Whether zoom is enabled for the pinch gesture.

    Defaults to true.

    Declaration

    Swift

    public var pinchZoomEnabled: Bool
  • Whether pan is enabled for the pinch gesture.

    Defaults to true.

    Declaration

    Swift

    public var pinchPanEnabled: Bool
  • Whether the pitch gesture is enabled.

    Defaults to true.

    Declaration

    Swift

    public var pitchEnabled: Bool
  • Whether double tapping the map with one touch results in a zoom-in animation.

    Defaults to true.

    Declaration

    Swift

    public var doubleTapToZoomInEnabled: Bool
  • Whether single tapping the map with two touches results in a zoom-out animation.

    Defaults to true.

    Declaration

    Swift

    public var doubleTouchToZoomOutEnabled: Bool
  • Whether the quick zoom gesture is enabled.

    Defaults to true.

    Declaration

    Swift

    public var quickZoomEnabled: Bool
  • Configures the directions in which the map is allowed to move during a pan gesture.

    Defaults to PanMode.horizontalAndVertical. Called scrollMode in the Android SDK for consistency with platform conventions.

    Declaration

    Swift

    public var panMode: PanMode
  • A constant factor that determines how quickly pan deceleration animations happen. Multiplied with the velocity vector once per millisecond during deceleration animations.

    Defaults to UIScrollView.DecelerationRate.normal.rawValue

    Declaration

    Swift

    public var panDecelerationFactor: CGFloat
  • By default, gestures rotate and zoom around the center of the gesture. Set this property to rotate and zoom around a fixed point instead.

    This property will be ignored by the pinch gesture if pinchPanEnabled is set to true.

    Declaration

    Swift

    public var focalPoint: CGPoint?
  • Initializes a GestureOptions.

    Declaration

    Swift

    public init(
        panEnabled: Bool = true,
        pinchEnabled: Bool = true,
        rotateEnabled: Bool = true,
        simultaneousRotateAndPinchZoomEnabled: Bool = true,
        pinchZoomEnabled: Bool = true,
        pinchPanEnabled: Bool = true,
        pitchEnabled: Bool = true,
        doubleTapToZoomInEnabled: Bool = true,
        doubleTouchToZoomOutEnabled: Bool = true,
        quickZoomEnabled: Bool = true,
        panMode: PanMode = .horizontalAndVertical,
        panDecelerationFactor: CGFloat = UIScrollView.DecelerationRate.normal.rawValue,
        focalPoint: CGPoint? = nil
    )

    Parameters

    panEnabled

    Whether the single-touch pan gesture is enabled.

    pinchEnabled

    Whether the pinch gesture is enabled.

    rotateEnabled

    Whether rotation gesture is enabled.

    simultaneousRotateAndPinchZoomEnabled

    Whether rotation is enabled for the pinch to zoom gesture.

    pinchZoomEnabled

    Whether zoom is enabled for the pinch gesture.

    pinchPanEnabled

    Whether pan is enabled for the pinch gesture.

    pitchEnabled

    Whether the pitch gesture is enabled.

    doubleTapToZoomInEnabled

    Whether double tapping the map with one touch results in a zoom-in animation.

    doubleTouchToZoomOutEnabled

    Whether single tapping the map with two touches results in a zoom-out animation.

    quickZoomEnabled

    Whether the quick zoom gesture is enabled.

    panMode

    The directions in which the map is allowed to move during a pan gesture.

    panDecelerationFactor

    The constant factor that determines how quickly pan deceleration animations happen.

    focalPoint

    The centerpoint for rotating and zooming the map.