Method EnableReroutingAsync
EnableReroutingAsync(RouteTask, RouteParameters, ReroutingStrategy, Boolean, CancellationToken)
Enables automatic rerouting when the tracker detects an off-route status.
Declaration
public Task EnableReroutingAsync(RouteTask routeTask, RouteParameters routeParameters, ReroutingStrategy reroutingStrategy, bool visitFirstStopOnStart, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Route |
routeTask | A Route |
Route |
routeParameters | A Route |
Rerouting |
reroutingStrategy | A rerouting strategy that determines how new routes are created (to the next waypoint by default). |
System. |
visitFirstStopOnStart | Whether the first stop must be visited when rerouted (false by default). |
Cancellation |
cancellationToken | Optional token that may be used to cancel the async enabling operation. |
Returns
Type | Description |
---|---|
Task | The task object representing the asynchronous operation to enable re-routing. |
Remarks
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.
See Also
Applies to
Platforms and versions
Target | Versions |
---|---|
UWP | 100.15 |
EnableReroutingAsync(ReroutingParameters, CancellationToken)
Enables automatic rerouting when the tracker detects an off-route status.
Declaration
public Task EnableReroutingAsync(ReroutingParameters parameters, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Rerouting |
parameters | A Rerouting |
Cancellation |
cancellationToken | Optional token that may be used to cancel the async enabling operation. |
Returns
Type | Description |
---|---|
Task | The |
Remarks
Re-routing only occurs when the current location is off-route, but on or near the transportation network edges. For example if an off-route state is detected but the tracked location is in a parking lot, away from any transportation network edges, re-routing will not occur, and will occur only once a subsequent tracked location is on or near the transportation network edges.
See Also
Applies to
Platforms and versions
Target | Versions |
---|---|
UWP | 100.15 |