Uses a location to provide status and progress updates as a route is traversed (by a moving vehicle, for example). More...
|Import Statement:||import Esri.ArcGISRuntime 100.7|
- enableReroutingStatus : Enums.TaskStatus
- generateVoiceGuidance : VoiceGuidance
- newVoiceGuidanceResult : VoiceGuidance
- rerouteCompletedResult : TrackingStatus
- rerouteFailedError : Error
- reroutingEnabled : bool
- routeIndex : int
- routeResult : RouteResult
- switchToNextDestinationStatus : Enums.TaskStatus
- trackLocationStatus : Enums.TaskStatus
- trackingStatus : TrackingStatus
- trackingStatusResult : TrackingStatus
- voiceGuidanceUnitSystem : Enums.UnitSystem
- void cancelRerouting()
- bool cancelTask(string taskId)
- string disableRerouting()
- string enableRerouting(RouteTask routeTask, RouteParameters routeParameters, ReroutingStrategy strategy, bool visitFirstStopOnStart)
- string switchToNextDestination()
- string trackLocation(Position location)
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:
- Create a new RouteTracker instance.
- Enable rerouting enableRerouting (if supported by the underlying route service).
- Subscribe trackLocation to a Location Provider (GPS, simulator, etc.) to track the location of the device.
- Subscribe Map to updating location after trackLocation to get the TrackingStatus as the location updates.
- If there are multiple stops, call switchToNextDestination each time Enums.DestinationStatusReached is returned. Before switching to the next destination, make sure TrackingStatus.remainingDestinationCount > 1, a value of 1 means the last destination is being approached.
See also Cancelable.
generateVoiceGuidance : VoiceGuidance
Returns the voice guidance notification (read-only).
The most recent voice guidance based on the last trackLocation. It can be used to repeat last/latest voice guidance.
newVoiceGuidanceResult : VoiceGuidance
rerouteCompletedResult : TrackingStatus
Returns whether routes are automatically regenerated when tracking status is off-route (read-only).
routeResult : RouteResult
The route result that will be used for tracking. It must contain at least one route.
The property should be set before any other operations. By default route number is 0.
trackingStatus : TrackingStatus
Returns the tracking status for the current location on the route (read-only).
trackingStatusResult : TrackingStatus
Emitted when the enableReroutingStatus property changes.
Emitted when the newVoiceGuidanceResult property changes.
Emitted when the rerouteCompletedResult property changes.
Emitted when the rerouteFailedError property changes.
Emitted when the reroutingEnabled property changes.
Emitted when the routeIndex property changes.
Emitted when the routeResult property changes.
Emitted when the switchToNextDestination property changes.
Emitted when the trackLocationStatus property changes.
Emitted when the trackingStatusResult property changes.
Emitted when the voiceGuidanceUnitSystem property changes.
Cancels a running reroute task.
If rerouting is started this method will interrupt the rerouting background process.
See also Cancelable.
Disables automatic rerouting.
When disabled, the tracker will not automatically recalculate a route when the tracking status is off-route.
Enables rerouting functionality of route tracker.
- routeTask - The RouteTask capable of solving routes on the same network used by the original route. This is usually the same RouteTask that was used to create the route being tracked. It will be used for rerouting in background thread.
- routeParameters - The RouteParameters that will be used for rerouting in background thread. The RouteParameters will be used for rerouting in background thread. The following properties will be ignored:
- strategy - A Enums.ReroutingStrategy that determines how route tracker should deal with remaining stops/waypoints during reroute process (reroute to next waypoint by default).
- visitFirstStopOnStart - A flag that forces route tracker to navigate to first stop of route.
Rerouting is initiated automatically when the tracking status is off-route. In order to be considered off-route, the location must be on the transportation network as well as off the current route. If a tracked location is in a parking lot, for example, it is not considered off-route and rerouting will not occur. If the next location is on the network but not on the route, automatic rerouting will begin.
The enableReroutingStatusChanged signal will emit when the operation is complete.
Starts tracking progress to the next destination in the Route.
Use switchToNextDestination when the tracker reports a Enums.DestinationStatusReached status. Before calling switchToNextDestination make sure that TrackingStatus.remainingDestinationCount >
1. A value of
1 means navigation is proceeding to last destination. This method can also be called after Enums.DestinationStatusApproaching in cases where the location cannot get near enough to the destination point for Enums.DestinationStatusReached (such as the center of a park or shopping center, for example).
The switchToNextDestinationStatusChanged signal is emitted when this operation is complete.
Provides route tracking status relative to the provided location.
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 and TrackingStatus returned when completed.
Method should be called each time a new position is received from the location source (usually once per second).
The trackLocationStatusChanged signal will emit when the operation is complete.