Class RouteTracker
Uses a location to provide status and progress updates as a route is traversed (by a moving vehicle, for example).
Inheritance
Namespace: Esri.ArcGISRuntime.Navigation
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class RouteTracker
Remarks
RouteTracker can give the time or distance to the next maneuver, notify if the location is off-route, and regenerate a new route if necessary.
Basic workflow:
-
Create a new Route
Tracker instance. -
Enable rerouting via Enable
Rerouting (if supported by the underlying route service).Async(Rerouting Parameters, Cancellation Token) -
Use Track
Location to track the location of the device.Async(Location, Cancellation Token) -
Subscribe to Tracking
Status event to get the TrackingChanged Status as the location changes. For example, this can be used to show DisplayLocation in the GeoView. -
Subscribe to New
Voice to get the VoiceGuidance Guidance whenever new instructions are available. -
If there are multiple stops, call
Switch
To each time Reached status is returned. Before calling SwitchNext Destination Async(Cancellation Token) To make sure that RemainingNext Destination Async(Cancellation Token) Destination > 1 (a value of 1 means the last destination is being approached).Count
Constructors
Name | Description |
---|---|
Route |
Initializes a new instance of the Route |
Properties
Name | Description |
---|---|
Is |
Gets a value indicating whether routes are automatically regenerated when tracking status is off-route. |
Skip |
Gets a value indicating whether multiple stops in a row at the same location should be treated as one stop. |
Tracking |
Gets the latest Tracking |
Voice |
Gets or sets the unit system in voice guidance commands. |
Methods
Name | Description |
---|---|
Cancel |
Cancels a running reroute task. |
Disable |
Disable automatic rerouting. |
Enable |
Enables automatic rerouting when the tracker detects an off-route status. |
Generate |
Gets the current Voice |
Switch |
Starts tracking progress to the next destination in the Route. |
Track |
Provides route tracking status relative to the provided location. |
Events
Name | Description |
---|---|
New |
Occurs when new Voice |
Reroute |
Occurs when re-routing is completed. |
Reroute |
Occurs when re-routing is started. |
Tracking |
Occurs when the Tracking |
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.6 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.6 - 200.6 |
Xamarin.Android | 100.6 - 100.15 |
Xamarin.iOS | 100.6 - 100.15 |
UWP | 100.6 - 200.6 |