A list model storing a list of DirectionManeuver for a Route. More...
Import Statement: | import Esri.ArcGISRuntime 100.15 |
Since: | Esri.ArcGISRuntime 100.0 |
Properties
- count : int
Methods
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:
Role | Type | Description |
---|---|---|
directionManeuverType | Enums.DirectionManeuverType | The type of direction maneuver. |
directionText | string | The step-by-step directions of the maneuver. |
duration | double | The duration of the maneuver in minutes. |
estimatedArrivalTime | Date | The estimated arrival time in UTC time. |
estimatedArrivalTimeShift | double | The time zone shift in minutes of the estimated arrival time. |
geometry | Geometry | The geometry of the maneuver. |
length | double | The length of the maneuver in meters. |
See also RouteTask, Route, RouteResult, and DirectionManeuver.
Property Documentation
Method Documentation
Receives a callback function to execute for each direction maneuver in the model.
Callback function can take 0 to 3 optional arguments, in order:
- element Current direction maneuver.
- index Current index in array.
- array Reference to DirectionManeuverListModel.
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.