TPEGTrafficService

public class TPEGTrafficService : TrafficService
extension TPEGTrafficService: OnStoreAccessChangedObserver
extension TPEGTrafficService: LocationProviderObservable

Reacts on and controls TPEG traffic provider behavior.

Important

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

Initializer

Public

  • Important

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

    Declaration

    Swift

    public var isConnected: Bool { get }
  • Important

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

    Declaration

    Swift

    public var trafficEventCount: Int { get }
  • Important

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

    Declaration

    Swift

    public var trafficInterface: UnsafeMutableRawPointer? { get }
  • Important

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

    Declaration

    Swift

    public func updateCurrentPosition(_ position: CLLocationCoordinate2D)
  • Important

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

    Declaration

    Swift

    public func updateRoutesForTraffic(_ routes: [[CLLocationCoordinate2D]])
  • Important

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

    Declaration

    Swift

    public func updateLocale(_ locale: Locale)
  • trafficEvents(for:) Asynchronous

    Important

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

    Declaration

    Swift

    public func trafficEvents(
        for boundingBox: TomTomSDKCommon
            .BoundingBox
    ) async -> Result<[TomTomSDKCommon.TrafficEvent], Error>
  • Important

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

    Declaration

    Swift

    public func trafficEvents(for boundingBox: TomTomSDKCommon.BoundingBox) throws -> [TomTomSDKCommon.TrafficEvent]
  • Important

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

    Declaration

    Swift

    public func addObserver(_ observer: TrafficUpdateObserver)
  • Important

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

    Declaration

    Swift

    public func removeObserver(_ observer: TrafficUpdateObserver)
  • Important

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

    Declaration

    Swift

    public func notifyMapLoaded()
  • Important

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

    Declaration

    Swift

    public func notifyMapUnloading()
  • Important

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

    Declaration

    Swift

    public func updateLocationProvider(_ locationProvider: LocationProvider)

    Parameters

    locationProvider

    The new LocationProvider.

OnStoreAccessChangedObserver

  • Important

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

    Declaration

    Swift

    public var onStoreAccessChangedObserverId: String { get }
  • Important

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

    Declaration

    Swift

    public func onReadOnlyAccessGranted(mapChanged: Bool)
  • Important

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

    Declaration

    Swift

    public func onReadOnlyAccessReleaseRequested(accessReleased: @escaping () -> ())

LocationProviderObservable

  • Important

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

    Declaration

    Swift

    public func onAuthorizationStatusChanged(isGranted: Bool)
  • Important

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

    Declaration

    Swift

    public func onHeadingUpdate(newHeading _: CLHeading, lastLocation _: GeoLocation)
  • Important

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

    Declaration

    Swift

    public func onLocationUpdated(location: GeoLocation)