Method TrackLocationAsync
TrackLocationAsync(Location, CancellationToken)
Provides route tracking status relative to the provided location.
Declaration
public Task TrackLocationAsync(Location location, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description | 
|---|---|---|
| Location | location | A location used to evaluate status and progress along the route.  | 
    
| CancellationToken | cancellationToken | Optional token that may be used to cancel the async tracking operation.  | 
    
Returns
| Type | Description | 
|---|---|
| Task | The task object representing the asynchronous operation.  | 
    
Remarks
The location generally comes from a GPS but may also be a simulated or manually entered location. It must have valid values for X and Y coordinates, speed (in meters per second), course (in degrees), and a timestamp. Events fired for RouteTracker when completed.
Applies to
Platforms and versions
| 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.14 | 
Relevant samples
Navigate route: Use a routing service to navigate between points.