RouteProgressSource

public protocol RouteProgressSource
  • The most recent RouteProgress available When possible, use addRouteProgressObserver instead of relying on this value, which may be inconsistent during e.g. navigation initialization

    Declaration

    Swift

    var currentRouteProgress: RouteProgress? { get }
  • Add an observer which will receive RouteProgress updates. If navigation is active, the observer will be called with the current RouteProgress state immediately. If it is not active, then the observer will be called with a nil value.

    This class only holds a weak reference to the observer. To remove the observer before it is deallocated, pass the observer to removeRouteProgressObserver All callbacks are guaranteed to happen on the main thread.

    Declaration

    Swift

    func addRouteProgressObserver(observer: RouteProgressObserver)
  • Remove a RouteProgress observer, before it is deallocated

    Declaration

    Swift

    func removeRouteProgressObserver(observer: RouteProgressObserver)