Skip To Content ArcGIS for Developers Sign In Dashboard

RouteTracker QML Type

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
Since: Esri.ArcGISRuntime 100.6





Detailed Description

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:

See also Cancelable.

Property Documentation

enableReroutingStatus : Enums.TaskStatus

Returns the current status of the enableRerouting method (read-only).

See also Enums.TaskStatus.

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

Return VoiceGuidance when newVoiceGuidanceResultChanged signal emits (read-only).

rerouteCompletedResult : TrackingStatus

Return TrackingStatus when rerouteCompletedResultChanged signal emits (read-only).

rerouteFailedError : Error

Return error when rerouteFailedErrorChanged signal emits (read-only).

reroutingEnabled : bool

Returns whether routes are automatically regenerated when tracking status is off-route (read-only).

routeIndex : int

The index of Route in RouteResult to track. The specified Route must contain Stops and Directions.

This property can be set only during instantiation.

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.

switchToNextDestinationStatus : Enums.TaskStatus

Returns the current status of the switchToNextDestination method (read-only).

See also Enums.TaskStatus.

trackLocationStatus : Enums.TaskStatus

Returns the current status of the trackLocation method (read-only).

See also Enums.TaskStatus.

trackingStatus : TrackingStatus

Returns the tracking status for the current location on the route (read-only).

trackingStatusResult : TrackingStatus

Return TrackingStatus when trackingStatusResultChanged signal emits (read-only).

voiceGuidanceUnitSystem : Enums.UnitSystem

The unit system used in voice guidance commands.

Default value is Enums.UnitSystemMetric.

See also Enums.UnitSystem.

Signal Documentation


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 background rerouting started.


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.

Method Documentation

void cancelRerouting()

Cancels a running reroute task.

If rerouting is started this method will interrupt the rerouting background process.

bool cancelTask(string taskId)

See also Cancelable.

string disableRerouting()

Disables automatic rerouting.

When disabled, the tracker will not automatically recalculate a route when the tracking status is off-route.

string enableRerouting(RouteTask routeTask, RouteParameters routeParameters, ReroutingStrategy strategy, bool visitFirstStopOnStart)

Enables rerouting functionality of route tracker.

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.

string switchToNextDestination()

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.

string trackLocation(Position location)

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.

Feedback on this topic?