RouteTracker QML Type

  • Esri.ArcGISRuntime
  • RouteTracker
  • 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
    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:

    Note: Only one RouteResult can be set per-instance of RouteTracker. A new instance of RouteTracker must be created for each new RouteResult.

    See also Cancelable.

    Property Documentation

    [read-only] enableReroutingStatus : Enums.TaskStatus

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

    See also Enums.TaskStatus.


    [read-only] 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.


    [read-only] newVoiceGuidanceResult : VoiceGuidance

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


    [read-only] rerouteCompletedResult : TrackingStatus

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


    [read-only] rerouteFailedError : Error

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


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

    Note: Only one RouteResult can be set per-instance of RouteTracker. A new instance of RouteTracker must be created for each new RouteResult.


    [since Esri.ArcGISRuntime 100.9] 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.


    [since Esri.ArcGISRuntime 100.12] speechEngineReadyCallback : var

    Sets a callback function to be called to determine if the text-to-speech engine is ready.

    The function is called by RouteTracker internally before providing newVoiceGuidanceResult to check if the text-to-speech engine is busy. If it is busy it will postpone raising the voice guidance event until next time trackLocation is called.

    This will be called internally by RouteTracker on a background thread.

    Setting this is optional, and if this is not set RouteTracker assumes the speech engine is always ready so that no voice guidance messages are skipped.

    The function provided must be callable and return true if the engine is ready, false otherwise.

    This can be set or unset at any time.

    Here is an example of usage.

    RouteTracker {
        speechEngineReadyCallback: function() {
            return ttsEngine.textToSpeechEngineReady();
        }
    }

    Here is an example of unsetting this if you no longer want it to be used.

    RouteTracker {
        speechEngineReadyCallback: undefined
    }

    By default no function is set.

    This property was introduced in Esri.ArcGISRuntime 100.12.


    [read-only] switchToNextDestinationStatus : Enums.TaskStatus

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

    See also Enums.TaskStatus.


    [read-only] trackLocationStatus : Enums.TaskStatus

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

    See also Enums.TaskStatus.


    [read-only] trackingStatus : TrackingStatus

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


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


    [since Esri.ArcGISRuntime 100.9] skipCoincidentStopsChanged()

    Emitted when the skipCoincidentStops property changes.

    Note: The corresponding handler is onSkipCoincidentStopsChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.9.


    [since Esri.ArcGISRuntime 100.12] speechEngineReadyCallbackChanged()

    Emitted when the speechEngineReadyCallback property changes.

    Note: The corresponding handler is onSpeechEngineReadyCallbackChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.12.


    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(string taskId)

    Cancel the task with the ID taskId.

    Returns false if the task cannot be canceled 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.


    [since Esri.ArcGISRuntime 100.11] string enableReroutingWithReroutingParameters(ReroutingParameters parameters)

    Enables automatic rerouting when the tracker detects an off-route status.

    Rerouting only occurs when the current location is off-route, but on or near the transportation network edges. For example if an off-route state is detected, but the tracked location is in a parking lot, away from any transportation network edges, rerouting will not occur, and will occur only when a subsequent tracked location is on or near the transportation network edges.

    Returns a string representing the task ID of the asynchronous task.

    This method was introduced in Esri.ArcGISRuntime 100.11.


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


    [since Esri.ArcGISRuntime 100.8] string trackRuntimeLocation(Location 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.


    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.