ArcGIS Runtime SDK for iOS: AGSRouteTracker(AGSDeprecated) Category Reference
ArcGIS Runtime SDK for iOS  100.12
AGSRouteTracker(AGSDeprecated) Category Reference

Instance Methods

(id< AGSCancelable >) - enableReroutingWithRouteTask:routeParameters:strategy:visitFirstStopOnStart:completion:
 
(nullable instancetype) - initWithRouteResult:routeIndex:
 

Class Methods

(nullable instancetype) + routeTrackerWithRouteResult:routeIndex:
 

Method Documentation

◆ enableReroutingWithRouteTask:routeParameters:strategy:visitFirstStopOnStart:completion:

- (id<AGSCancelable>) enableReroutingWithRouteTask: (AGSRouteTask *)  routeTask
routeParameters: (AGSRouteParameters *)  routeParameters
strategy: (AGSReroutingStrategy strategy
visitFirstStopOnStart: (BOOL)  visitFirstStopOnStart
completion: (void(^)(NSError *__nullable error))  completion 

Enables automatic rerouting when the tracker detects an off-route status.

Rerouting is initiated automatically when the tracking status is off-route. In order to be considered off-route, the location must be on the transportation network as well as off the current route. If a tracked location is in a parking lot, for example, it is not considered off-route and rerouting will not occur. If the next location is on the network but not on the route, automatic rerouting will begin.

Parameters
routeTaskAn AGSRouteTask capable of solving routes on the same network used by the original route.
routeParametersAn AGSRouteParameters object that defines parameters for the rerouting AGSRouteTask.
strategyA rerouting strategy that determines how new routes are created (to the next waypoint by default).
visitFirstStopOnStartWhether the first stop must be visited when rerouted (NO by default).
completionThe error parameter is populated on failure.
Returns
An operation which can be canceled.
See also
AGSRouteTask, AGSRouteParameters, AGSReroutingStrategy
Since
100.6
Deprecated:
100.11.0. Use enableReroutingWithParameters:completion: (AGSRouteTracker) instead.

Extends class AGSRouteTracker.

◆ initWithRouteResult:routeIndex:

- (nullable instancetype) initWithRouteResult: (AGSRouteResult *)  routeResult
routeIndex: (NSInteger)  routeIndex 

Creates a Route Tracker using a specific route from a route result. Will return nil if the AGSRoute is not found or if it lacks AGSRoute::stops and AGSRoute::directionManeuvers. This initializer will set the property AGSRouteTracker::skipCoincidentStops to YES. To set this property explicitly, use initWithRouteResult:routeIndex:skipCoincidentStops: (AGSRouteTracker) instead.

Parameters
routeResultAn AGSRouteResult generated from route task solve.
routeIndexThe integer value for which route to use in the array of AGSRouteResult::routes. The array is zero-based.
See also
AGSRouteResult
Since
100.6
Deprecated:
100.9.0. Use initWithRouteResult:routeIndex:skipCoincidentStops: (AGSRouteTracker) instead.

Extends class AGSRouteTracker.

◆ routeTrackerWithRouteResult:routeIndex:

+ (nullable instancetype) routeTrackerWithRouteResult: (AGSRouteResult *)  routeResult
routeIndex: (NSInteger)  routeIndex 

Creates a Route Tracker using a specific route from a route result. Will return nil if the AGSRoute is not found or if it lacks AGSRoute::stops and AGSRoute::directionManeuvers. This initializer will set the property AGSRouteTracker::skipCoincidentStops to YES. To set this property explicitly, use initWithRouteResult:routeIndex:skipCoincidentStops: (AGSRouteTracker) instead.

Parameters
routeResultAn AGSRouteResult generated from route task solve.
routeIndexThe integer value for which route to use in the array of AGSRouteResult::routes. The array is zero-based.
See also
AGSRouteResult
Since
100.6
Deprecated:
100.9.0. Use routeTrackerWithRouteResult:routeIndex:skipCoincidentStops: (AGSRouteTracker) instead.

Extends class AGSRouteTracker.