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

Object

Properties

Signals

Methods

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.


skipCoincidentStops : int

Returns if multiple stops in a row at the same location should treated as one stop. When true, if there are multiple stops in a row, at the same network location, the new voice guidance event will fire a single time. Calling switchToNextDestination will skip over the other coincident stops, setting the state to the next relevant direction maneuver. If the value is false, each stop will be treated as a unique destination. The default value for this property is true. If your route does not have coincident stops, the value of this property will have no effect.

This property can be set only during instantiation.

This property was introduced in Esri.ArcGISRuntime 100.9.


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

enableReroutingStatusChanged()

Emitted when the enableReroutingStatus property changes.

Note: The corresponding handler is onEnableReroutingStatusChanged.


newVoiceGuidanceResultChanged()

Emitted when the newVoiceGuidanceResult property changes.

Note: The corresponding handler is onNewVoiceGuidanceResultChanged.


rerouteCompletedResultChanged()

Emitted when the rerouteCompletedResult property changes.

Note: The corresponding handler is onRerouteCompletedResultChanged.


rerouteFailedErrorChanged()

Emitted when the rerouteFailedError property changes.

Note: The corresponding handler is onRerouteFailedErrorChanged.


rerouteStarted()

Emitted when background rerouting started.

Note: The corresponding handler is onRerouteStarted.


reroutingEnabledChanged()

Emitted when the reroutingEnabled property changes.

Note: The corresponding handler is onReroutingEnabledChanged.


routeIndexChanged()

Emitted when the routeIndex property changes.

Note: The corresponding handler is onRouteIndexChanged.


routeResultChanged()

Emitted when the routeResult property changes.

Note: The corresponding handler is onRouteResultChanged.


switchToNextDestinationStatusChanged()

Emitted when the switchToNextDestination property changes.

Note: The corresponding handler is onSwitchToNextDestinationStatusChanged.


trackLocationStatusChanged()

Emitted when the trackLocationStatus property changes.

Note: The corresponding handler is onTrackLocationStatusChanged.


trackingStatusResultChanged()

Emitted when the trackingStatusResult property changes.

Note: The corresponding handler is onTrackingStatusResultChanged.


voiceGuidanceUnitSystemChanged()

Emitted when the voiceGuidanceUnitSystem property changes.

Note: The corresponding handler is onVoiceGuidanceUnitSystemChanged.


Method Documentation

void cancelRerouting()

Cancels a running reroute task.

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


bool cancelTask(taskId)

Cancel the task with the ID taskId.

Returns false if the task cannot be cancelled or there is no task with the specified id 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, 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.

RouteTracker::trackLocation needs to be called at least once before calling this method; otherwise an error will be emitted. RouteTracker::trackLocation is needed for getting TrackingStatus and for handling visitFirstStopOnStart.


string trackLocation(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.


string trackRuntimeLocation(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, velocity (in meters per second), heading (in degrees), and a timestamp. When a new location is tracked the trackingStatusResultChanged signal will be emmited.

This 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.

This method was introduced in Esri.ArcGISRuntime 100.8.



Feedback on this topic?