Location
@objc
public class Location : NSObject
Instances of this class are delivered to LocationConsumer
s 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
, andhorizontalAccuracy
.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
ifheading
isnil
,heading.trueHeading
if it’s non-negative, andheading.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)