GeoLocation

public struct GeoLocation

GeoLocation is a wrapper for CLLocation class.

Lifecycle

  • GeoLocation init method.

    Declaration

    Swift

    public init(
        location: CLLocation,
        heading: Measurement<UnitAngle>? = nil,
        providerType: LocationEngineProviderType = .gnss,
        gpsStatus: GPSStatus = .fixed
    )

    Parameters

    location

    A CLLocation object contains the geographical location and altitude of a device.

    heading

    Compass angle the object is pointing to from the current location. Or nil if not available.

    providerType

    The source that provides the location.

    gpsStatus

    Indicates if GPS is fixed or not.

  • GeoLocation init method.

    Declaration

    Swift

    public init(
        location: CLLocation,
        heading: Measurement<UnitAngle>? = nil,
        providerType: LocationEngineProviderType = .gnss,
        gpsStatus: GPSStatus = .fixed,
        timestamp: Date
    )

    Parameters

    location

    A CLLocation object contains the geographical location and altitude of a device.

    heading

    Compass angle the object is pointing to from the current location. Or nil if not available.

    providerType

    The source that provides the location.

    gpsStatus

    Indicates if GPS is fixed or not.

    timestamp

    The date associated with the location.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

Public

  • 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