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. |
| System.Threading.CancellationToken | cancellationToken | Optional token that may be used to cancel the async tracking operation. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.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 - 200.8 |
| .NET | 100.13 - 200.8 |
| .NET Windows | 100.13 - 200.8 |
| .NET Android | 200.2 - 200.8 |
| .NET iOS | 200.0 - 200.8 |
| .NET Framework | 100.6 - 200.8 |
| Xamarin.Android | 100.6 - 100.14 |
| Xamarin.iOS | 100.6 - 100.15 |
| UWP | 100.6 - 200.8 |
Relevant samples
Navigate route: Use a routing service to navigate between points.