DirectionManeuverListModel QML Type

DirectionManeuver for a Route."> DirectionManeuverListModel QML Type | ArcGISQtQml
  • Esri.ArcGISRuntime
  • DirectionManeuverListModel
  • A list model storing a list of DirectionManeuver for a Route. More...

    Import Statement: import Esri.ArcGISRuntime
    Since: Esri.ArcGISRuntime 100.0

    Properties

    Methods

    • error forEach(callback)
    • DirectionManeuver get(int index)

    Detailed Description

    Direction maneuvers give you a step-by-step explanation of how you would get from one location to another along a transportation network. Each direction maneuver contains information such as the description of what you should do (e.g. "Turn right on Main St"), the duration of that maneuver (e.g. 2 minutes), and the local arrival time. DirectionManeuverListModel is meant to simplify the workflow of obtaining direction maneuvers from a RouteResult, and populating the resulting information into a view. For example, you may want to get all of your route's direction maneuvers and display them in a list view for a user to scroll through. Since each direction maneuver contains geometry, you can zoom to each direction maneuver on the map as the user clicks on the different items in the list.

    The model returns data for the following roles:

    RoleTypeDescription
    directionManeuverTypeEnums.DirectionManeuverTypeThe type of direction maneuver.
    directionTextstringThe step-by-step directions of the maneuver.
    durationdoubleThe duration of the maneuver in minutes.
    estimatedArrivalTimeDateThe estimated arrival time in UTC time.
    estimatedArrivalTimeShiftdoubleThe time zone shift in minutes of the estimated arrival time.
    geometryGeometryThe geometry of the maneuver.
    lengthdoubleThe length of the maneuver in meters.

    See also RouteTask, Route, RouteResult, and DirectionManeuver.

    Property Documentation

    [read-only] count : int

    The number of rows in the model (read-only).


    Method Documentation

    error forEach(callback)

    Receives a callback function to execute for each direction maneuver in the model.

    Callback function can take 0 to 3 optional arguments, in order:

    Returns undefined if no error was occurred, and a message error otherwise.

    const error = directionManeuverListModel.forEach(function(element, index, array) {
        ...
    });
    if (error) {
        console.error(error.message);
    }

    DirectionManeuver get(int index)

    Gets the DirectionManeuver at a given index in the model.


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