LocationOptions

public struct LocationOptions : Equatable

A struct to configure a LocationManager

  • Specifies the minimum distance (measured in meters) a device must move horizontally before a location update is generated.

    The default value of this property is kCLDistanceFilterNone.

    Declaration

    Swift

    public var distanceFilter: CLLocationDistance
  • Specifies the accuracy of the location data.

    The default value is kCLLocationAccuracyBest.

    Declaration

    Swift

    public var desiredAccuracy: CLLocationAccuracy
  • Sets the type of user activity associated with the location updates.

    The default value is CLActivityType.other.

    Declaration

    Swift

    public var activityType: CLActivityType
  • Sets the type of puck that should be used

    Declaration

    Swift

    public var puckType: PuckType?
  • Specifies if a Puck should use Heading or Course for the bearing.

    The default value is PuckBearing.heading.

    Declaration

    Swift

    public var puckBearing: PuckBearing
  • Whether the puck rotates to track the bearing source.

    The default value is true.

    Declaration

    Swift

    public var puckBearingEnabled: Bool
  • Initializes a LocationOptions.

    Declaration

    Swift

    public init(
        distanceFilter: CLLocationDistance = kCLDistanceFilterNone,
        desiredAccuracy: CLLocationAccuracy = kCLLocationAccuracyBest,
        activityType: CLActivityType = .other,
        puckType: PuckType? = nil,
        puckBearing: PuckBearing = .heading,
        puckBearingEnabled: Bool = true
    )

    Parameters

    distanceFilter

    Specifies the minimum distance (measured in meters) a device must move horizontally before a location update is generated.

    desiredAccuracy

    Specifies the accuracy of the location data.

    activityType

    Sets the type of user activity associated with the location.

    puckType

    Sets the type of puck that should be used.

    puckBearing

    Specifies if a Puck should use Heading or Course for the bearing.

    puckBearingEnabled

    Whether the puck rotates to track the bearing source.