UserLocationViewStyles

public struct UserLocationViewStyles : Equatable

A struct containing information about the user location view style for each state.

  • The struct containing information about the user location view style for normal state.

    Default is UserLocationViewStateStyle()

    Declaration

    Swift

    public let normal: UserLocationViewStateStyle
  • The struct containing information about the user location view style for stale state.

    Default is UserLocationViewStateStyle(foregroundColor: .gray, headingColor: .gray)

    Declaration

    Swift

    public let stale: UserLocationViewStateStyle
  • The opacity for user location view when the user is out of the currently active level. Set any value between 0.0 and 1.0.

    Default is 0.5

    Declaration

    Swift

    public let outOfActiveLevelOpacity: Float
  • The color to use as the accuracy view color property.

    Default is .blue

    Declaration

    Swift

    public let accuracyColor: UIColor
  • The opacity of the accuracy view to a value from 0 to 1, where 0 means the accuracy view is completely transparent and 1 means the view is completely opaque.

    Default is 0.15

    Declaration

    Swift

    public let accuracyAlpha: Float
  • Enable or disable the pulsing circle.

    Default is false

    Declaration

    Swift

    public let pulseEnabled: Bool
  • The color of the pulsing circle.

    Default is .blue

    Declaration

    Swift

    public let pulseColor: UIColor
  • The opacity of the pulsing circle. The expected range is 0 to 1. An opacity of 1 makes the layer fully visible.

    Default is 0.4

    Declaration

    Swift

    public let pulseAlpha: Float
  • Initializes a new user location view styles with the specified parameters.

    Declaration

    Swift

    public init(
        normal: UserLocationViewStateStyle = .init(),
        stale: UserLocationViewStateStyle = .init(foregroundColor: .gray, headingColor: .gray),
        outOfActiveLevelOpacity: Float = 0.5,
        accuracyColor: UIColor = .blue, accuracyAlpha: Float = 0.15,
        pulseEnabled: Bool = false, pulseColor: UIColor = .blue, pulseAlpha: Float = 0.4
    )

    Parameters

    normal

    The struct containing information about the user location view style for normal state. Default is UserLocationViewStateStyle()

    stale

    The struct containing information about the user location view style for stale state. Default is UserLocationViewStateStyle(foregroundColor: .gray, headingColor: .gray)

    outOfActiveLevelOpacity

    The opacity for user location view when the user is out of the currently active level. Set any value between 0.0 and 1.0. Default is 0.5

    accuracyColor

    The color to use as the accuracy view color property. Default is .blue

    accuracyAlpha

    The opacity of the accuracy view to a value from 0 to 1, where 0 means the accuracy view is completely transparent and 1 means the view is completely opaque. Default is 0.15

    pulseEnabled

    Enable or disable the pulsing circle. Default is false

    pulseColor

    The color of the pulsing circle. Default is .blue

    pulseAlpha

    The opacity of the pulsing circle. The expected range is 0 to 1. An opacity of 1 makes the layer fully visible. Default is 0.4