CompassViewOptions

public struct CompassViewOptions : OrnamentOptionsProtocol, Equatable

Used to configure position, margin, image, and visibility for the map’s compass view.

  • The position of the compass view.

    The default value for this property is .topTrailing.

    Declaration

    Swift

    public var position: OrnamentPosition
  • The margins of the compass view.

    The default value for this property is CGPoint(x: 8.0, y: 8.0).

    Declaration

    Swift

    public var margins: CGPoint
  • The image used for displaying the compass.

    The default value for this property is nil, default compass image will be drawn.

    Declaration

    Swift

    public var image: UIImage?
  • The visibility of the compass view.

    The default value for this property is .adaptive.

    Declaration

    Swift

    public var visibility: OrnamentVisibility
  • Initializes a CompassViewOptions.

    Declaration

    Swift

    public init(
        position: OrnamentPosition = .topTrailing,
        margins: CGPoint = .init(x: 8.0, y: 8.0),
        image: UIImage? = nil,
        visibility: OrnamentVisibility = .adaptive
    )

    Parameters

    position

    The position of the compass view.

    margins

    The margins of the compass view.

    image

    The image used for displaying the compass.

    visibility

    The visibility of the compass view.