Method SwitchToNextDestinationAsync
SwitchToNextDestinationAsync(CancellationToken)
Starts tracking progress to the next destination in the Route.
Declaration
public Task SwitchToNextDestinationAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken | Optional token that may be used to cancel the async operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task object representing the asynchronous operation. |
Remarks
Use SwitchToNextDestinationAsync(CancellationToken) when the tracker reports a Reached status. Before calling SwitchToNextDestinationAsync(CancellationToken) make sure that RemainingDestinationCount > 1 (a value of 1 means navigation is proceeding to last destination). This method can also be called after Approaching is raised in cases where the location cannot get near enough to the destination point for Reached to be raised (such as the center of a park or shopping center, for example). TrackLocationAsync(Location, CancellationToken) needs to be called at least once before calling this method otherwise an error will be thrown. TrackLocationAsync(Location, CancellationToken) is needed for getting TrackingStatus and for handling visitFirstStopOnStart.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.6 - 200.5 |
.NET | 100.13 - 200.5 |
.NET Windows | 100.13 - 200.5 |
.NET Android | 200.2 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.6 - 200.5 |
Xamarin.Android | 100.6 - 100.14 |
Xamarin.iOS | 100.6 - 100.15 |
UWP | 100.6 - 200.5 |