SITNavigationDelegate
Objective-C
@protocol SITNavigationDelegate <NSObject>
Swift
protocol SITNavigationDelegate : NSObjectProtocol
Protocol for SITNavigationManager. Use this to listen for route progression related callbacks.
-
Called when a navigation is started
Declaration
Objective-C
- (void)navigationManager:(id<SITNavigationInterface> _Nonnull)navigationManager didStartOnRoute:(SITRoute *_Nonnull)route;
Swift
optional func navigationManager(_ navigationManager: SITNavigationInterface, didStartOn route: SITRoute)
Parameters
navigationManager
navigation provider (object that called this method).
route
SITRoute that the user is following.
-
Called when an error is encountered.
Declaration
Objective-C
- (void)navigationManager:(id<SITNavigationInterface> _Nonnull)navigationManager didFailWithError:(NSError *_Nonnull)error;
Swift
optional func navigationManager(_ navigationManager: SITNavigationInterface, didFailWithError error: Error)
Parameters
navigationManager
navigation provider.
error
error that describes the problematic situation.
-
Called when a user progresses on a route
Declaration
Objective-C
- (void)navigationManager:(id<SITNavigationInterface> _Nonnull)navigationManager didUpdateProgress:(SITNavigationProgress *_Nonnull)progress onRoute:(SITRoute *_Nonnull)route;
Swift
optional func navigationManager(_ navigationManager: SITNavigationInterface, didUpdate progress: SITNavigationProgress, on route: SITRoute)
Parameters
navigationManager
navigation provider (object that called this method)
progress
object containing information about current progress on route
route
SITRoute that the user is following
-
Called when location has reached the last point on a route.
Note
arriving to the destination means the user is less than distanceToGoalThreshold meters (defined in SITNavigationRequest) to the goal.Declaration
Objective-C
- (void)navigationManager:(id<SITNavigationInterface> _Nonnull)navigationManager destinationReachedOnRoute:(SITRoute *_Nonnull)route;
Swift
optional func navigationManager(_ navigationManager: SITNavigationInterface, destinationReachedOn route: SITRoute)
Parameters
navigationManager
navigation provider (object that called this method).
route
SITRoute that the user is following.
-
Called when location has deviated from route enough to warrant a re-routing.
Note
outside the route means the user is more the outsideRouteThreshold meters (defined in SITNavigationRequest) to the route.Declaration
Objective-C
- (void)navigationManager:(id<SITNavigationInterface> _Nonnull)navigationManager userOutsideRoute:(SITRoute *_Nonnull)route;
Swift
optional func navigationManager(_ navigationManager: SITNavigationInterface, userOutsideRoute route: SITRoute)
Parameters
navigationManager
navigation provider (object that called this method).
route
SITRoute that the user is following.
-
Called when a navigation is cancelled.
Declaration
Objective-C
- (void)navigationManager:(id<SITNavigationInterface> _Nonnull)navigationManager didCancelOnRoute:(SITRoute *_Nonnull)route;
Swift
optional func navigationManager(_ navigationManager: SITNavigationInterface, didCancelOn route: SITRoute)
Parameters
navigationManager
navigation provider (object that called this method).
route
SITRoute that the user is following.