GeoLocation
public struct GeoLocation
A wrapper for the CLLocation class, encapsulating additional metadata for a location.
Provides a more detailed representation of a location by including heading, provider type, and GPS status. Use this struct to enhance the information provided by a simple CLLocation object.
-
Creates a new instance of
GeoLocation.Declaration
Swift
public init( location: CLLocation, heading: Measurement<UnitAngle>? = nil, providerType: LocationEngineProviderType = Defaults.providerType, gpsStatus: GPSStatus = Defaults.gpsStatus )Parameters
locationA CLLocation object contains the geographical location and altitude of a device.
headingCompass angle the object is pointing to from the current location. Or nil if not available.
providerTypeThe source that provides the location.
gpsStatusIndicates if GPS is fixed or not.
-
Creates a new instance of GeoLocation.
Declaration
Swift
public init( location: CLLocation, heading: Measurement<UnitAngle>? = nil, providerType: LocationEngineProviderType = Defaults.providerType, gpsStatus: GPSStatus = Defaults.gpsStatus, timestamp: Date, extras: [String: Any] = [:] )Parameters
locationA CLLocation object contains the geographical location and altitude of a device.
headingCompass angle the object is pointing to from the current location. Or nil if not available.
providerTypeThe source that provides the location.
gpsStatusIndicates if GPS is fixed or not.
timestampThe date associated with the location.
extrasExtra data accompanying this location.
ImportantThis is a Public Preview API. It may be changed or removed at any time.
-
Provides predefined announcement types.
Contains default values for
GeoLocationproperties, such as the provider type and GPS status. These defaults are used when initializing aGeoLocationinstance without specifying these propertiesSee moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum Defaults -
A CLLocation object contains the geographical location and altitude of a device, along with values indicating the accuracy of those measurements and when they were collected.
Declaration
Swift
public let location: CLLocation -
Compass angle the object is pointing to from the current location. Or nil if not available.
Declaration
Swift
public let heading: Measurement<UnitAngle>? -
The source that provides the location.
Declaration
Swift
public let providerType: LocationEngineProviderType -
Indicates if GPS is fixed or not.
Declaration
Swift
public let gpsStatus: GPSStatus -
The date associated with the location.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public let timestamp: Date -
The reference monotonic timestamp associated with the
Self.Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public let monotonicTimeSinceBoot: Measurement<UnitDuration> -
Extra data accompanying this location.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public let extras: [String : Any]
TomTom SDK for iOS (0.71.1)
GeoLocation