LocationManager
public final class LocationManager : NSObject
extension LocationManager: LocationProviderDelegate
An object responsible for notifying the map view about location-related events, such as a change in the device’s location.
-
Represents the latest location received from the location provider.
Declaration
Swift
public var latestLocation: Location? { get }
-
The object that acts as the delegate of the location manager.
Declaration
Swift
public weak var delegate: LocationPermissionsDelegate?
-
The current underlying location provider. Use
overrideLocationProvider(with:)
to substitute a different provider. Avoid manipulating the location provider directly. LocationManager assumes full responsibility for starting and stopping location and heading updates as needed.Declaration
Swift
public var locationProvider: LocationProvider! { get }
-
The set of objects that are currently consuming location updates. The returned object is a copy of the underlying one, so mutating it will have no effect.
Declaration
Swift
public var consumers: NSHashTable<LocationConsumer> { get }
-
Configuration options for the location manager.
Declaration
Swift
public var options: LocationOptions { get set }
-
Undocumented
Declaration
Swift
public func overrideLocationProvider(with customLocationProvider: LocationProvider)
-
The location manager holds weak references to consumers, client code should retain these references.
Declaration
Swift
public func addLocationConsumer(newConsumer consumer: LocationConsumer)
-
Removes a location consumer from the location manager.
Declaration
Swift
public func removeLocationConsumer(consumer: LocationConsumer)
-
Allows a custom case to request full accuracy
Declaration
Swift
@available(iOS 14.0, *) public func requestTemporaryFullAccuracyPermissions(withPurposeKey purposeKey: String)