ArcGIS Runtime SDK for macOS

Find Route


This sample demonstrates how to get a route between two locations. For simplicity, the sample comes loaded with a start and end stop. You can click on the route button to get a route between these stops. Once the route is generated, the directions button gets enabled. Click on the button to see the step by step directions for the route.

How it works

The sample uses the defaultRouteParameters(completion:) method on AGSRouteTask to get the default parameters from the service. Sets the stops in those parameters and the returnDirections to true. Then uses the solveRoute(with:completion:) method to solve for the route. Once the route is in, the sample displays the list of directions using the directionManeuvers property on the AGSRoute returned in the AGSRouteResult.

In this topic
  1. Description