Display directions for a route between two points.
Use case
Find routes with driving directions between any number of locations. You might use the ArcGIS platform to create a custom network for routing on a private roads.
How to use the sample
For simplicity, the sample comes loaded with a start and end stop. You can click on the Find Route button to display a route between these stops. Once the route is generated, turn-by-turn directions are shown in a list.
How it works
Create a RouteTask using a URL to an online route service.
Generate default RouteParameters using routeTask.CreateDefaultParametersAsync().
Set returnStops and returnDirections on the parameters to true.
Add Stops to the parameters stops collection for each destination.
Solve the route using routeTask.SolveAsync(routeParameters) to get a RouteResult.
Iterate through the result's Routes. To display the route, create a graphic using the geometry from route.RouteGeometry. To display directions, use routeDirectionManeuvers, and for each DirectionManeuver, display DirectionManeuver.DirectionText.