SPRouteTrackerDelegate
Objective-C
@protocol SPRouteTrackerDelegate <NSObject>
Swift
protocol SPRouteTrackerDelegate : NSObjectProtocol
Delegate for SPRouteTracker. Use this to listen for route progression related callbacks.
-
Called when location on route is changed.
Declaration
Objective-C
- (void)routeTracker:(nonnull SPRouteTracker *)tracker didUpdateLocation:(nonnull SPLocation *)location;Swift
optional func routeTracker(_ tracker: SPRouteTracker, didUpdate location: SPLocation)Parameters
trackerobject that called this method
locationcoordinate snapped to route
-
Called when location enters a new step on a route.
Declaration
Objective-C
- (void)routeTracker:(nonnull SPRouteTracker *)tracker didEnterRouteStep:(int)stepIndex;Swift
optional func routeTracker(_ tracker: SPRouteTracker, didEnterRouteStep stepIndex: Int32)Parameters
trackerobject that called this method
stepIndexindex of step on route
-
Called when location progresses on a route.
Declaration
Objective-C
- (void)routeTracker:(nonnull SPRouteTracker *)tracker didProgress:(nonnull SPRouteTrackerProgress *)progress;Swift
optional func routeTracker(_ tracker: SPRouteTracker, didProgress progress: SPRouteTrackerProgress)Parameters
trackerobject that called this method
progressobject containing information about current progress on route
-
Called when location has deviated from route enough to warrant a re-routing.
Declaration
Objective-C
- (void)routeTracker:(nonnull SPRouteTracker *)tracker reRouteRecommended:(BOOL)recommended;Swift
optional func routeTracker(_ tracker: SPRouteTracker, reRouteRecommended recommended: Bool)Parameters
trackerobject that called this method
recommendedtrue if new route calculation is recommended
-
Called when location has reached the last point on a route. Define the threshold/limit with the ‘setDestinationThreshold’ method.
Declaration
Objective-C
- (void)routeTracker:(nonnull SPRouteTracker *)tracker didFinishRoute:(nonnull SPRoute *)route;Swift
optional func routeTracker(_ tracker: SPRouteTracker, didFinish route: SPRoute)Parameters
trackerobject that called this method
routethe route that was finished
SPRouteTrackerDelegate Protocol Reference