RouteProgressSource
public protocol RouteProgressSource
-
The most recent
RouteProgress
available When possible, useaddRouteProgressObserver
instead of relying on this value, which may be inconsistent during e.g. navigation initializationDeclaration
Swift
var currentRouteProgress: RouteProgress? { get }
-
Add an observer which will receive
RouteProgress
updates. If navigation is active, the observer will be called with the currentRouteProgress
state immediately. If it is not active, then the observer will be called with anil
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 deallocatedDeclaration
Swift
func removeRouteProgressObserver(observer: RouteProgressObserver)