Location

@objc
public class Location : NSObject

Instances of this class are delivered to LocationConsumers by LocationManager whenever the heading, location, or accuracy authorization change.

  • A heading value. May be used directly or via the higher-level headingDirection property.

    Declaration

    Swift

    public let heading: CLHeading?
  • A location value. May be used directly or via the convenience accessors coordinate, course, and horizontalAccuracy.

    Declaration

    Swift

    public let location: CLLocation
  • A conveninece accessor for location.coordinate

    Declaration

    Swift

    public var coordinate: CLLocationCoordinate2D { get }
  • A convenience accessor for location.course

    Declaration

    Swift

    public var course: CLLocationDirection { get }
  • A convenience accessor for location.horizontalAccuracy

    Declaration

    Swift

    public var horizontalAccuracy: CLLocationAccuracy { get }
  • Returns nil if heading is nil, heading.trueHeading if it’s non-negative, and heading.magneticHeading otherwise.

    Declaration

    Swift

    public var headingDirection: CLLocationDirection? { get }
  • An accuracy authorization value.

    Declaration

    Swift

    public let accuracyAuthorization: CLAccuracyAuthorization
  • Initialize a Location

    Declaration

    Swift

    public init(location: CLLocation,
                heading: CLHeading?,
                accuracyAuthorization: CLAccuracyAuthorization)