Constructor RouteTracker
RouteTracker(RouteResult, Int32)
Initializes a new instance of the RouteTracker class using a specific route from a route result.
Declaration
public RouteTracker(RouteResult routeResult, int routeIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| RouteResult | routeResult | A RouteResult generated from route task solve. The RouteResult must contain at least one Route (with Stops and DirectionManeuvers. |
| System.Int32 | routeIndex | The zero-based index of the Route within |
Remarks
An exception is thrown if the Route is not found or if it lacks
Stops and DirectionManeuvers. This constructor
will set the property SkipCoincidentStops to true. To
set this property explicitly use the constructor RouteTracker(RouteResult, int, bool)
instead.
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| .NET Standard 2.0 | 100.6 - 100.13 |
| .NET Framework | 100.6 - 100.9 |
| .NET 5 | 100.11 |
| .NET Core 3.1 | 100.7 - 100.9 |
| Xamarin.Android | 100.6 - 100.13 |
| Xamarin.iOS | 100.6 - 100.9 |
| UWP | 100.6 - 100.15 |
Relevant samples
RouteTracker(RouteResult, Int32, Boolean)
Initializes a new instance of the RouteTracker class using a specific route from a route result with an option to specify treating coincident stops as a single destination.
Declaration
public RouteTracker(RouteResult routeResult, int routeIndex, bool skipCoincidentStops)
Parameters
| Type | Name | Description |
|---|---|---|
| RouteResult | routeResult | A RouteResult generated from route task solve. The RouteResult must contain at least one Route (with Stops and DirectionManeuvers. |
| System.Int32 | routeIndex | The zero-based index of the Route within |
| System.Boolean | skipCoincidentStops | Determines if coincident stops (multiple stops in a row at the same location) should be
treated as a single destination. When true, if there are multiple stops in a row at
the same network location, the new voice guidance event will fire a single time and calling
SwitchToNextDestinationAsync(CancellationToken) will skip over
the other coincident stops, setting the state to the next relevant direction maneuver. If
the value is |
Remarks
An exception is thrown if the Route is not found or if it lacks Stops or DirectionManeuvers.
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| .NET Standard 2.0 | 100.10 - 100.15 |
| .NET 6.0 | 100.13 - 100.15 |
| .NET 6.0 Windows | 100.13 - 100.15 |
| .NET Framework | 100.10 - 100.15 |
| .NET 5 | 100.10 - 100.12 |
| .NET Core 3.1 | 100.10 - 100.12 |
| Xamarin.Android | 100.10 - 100.15 |
| Xamarin.iOS | 100.10 - 100.15 |
| UWP | 100.10 - 100.15 |