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:
-
(1) Create a new Route
Tracker instance. -
(2) Enable rerouting via Enable
Rerouting (if supported by the underlying route service).Async(Rerouting Parameters, Cancellation Token) -
(3) Use Track
Location to track the location of the device.Async(Location, Cancellation Token) -
(4) 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 Esri.Arc .GISRuntime. UI. Controls. Geo View -
(5) Subscribe to New
Voice to get the VoiceGuidance Guidance whenever new instructions are available. -
(6) 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 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.6 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.6 - 100.15 |
Xamarin.iOS | 100.6 - 100.15 |
UWP | 100.6 - 100.15 |