Show a route between two points on a map using Esri's routing service REST API.
- Set your API Key in the ArcGISMapActor using the World Outliner window (if you are using the SampleViewerLevel you can also set the key through the UI or the level blueprint).
- While holding shift, left-click on two locations on the map. The route between the two points will be shown.
- This sample uses Esri's routing service's REST API to query the closest route along the road network between two points.
- Based on the query response, breadcrumbs are placed along the route. Raycasts are used to determine the height at each breadcrumb's position to account for elevation.
- Spline meshes are used to visualize the route segments between pairs of breadcrumbs.
- This sample is only set up to work with mouse and keyboard.
- This service uses routing operations associated with your API Key. You can learn more about API keys and Accounts in the Mapping APIs and location services guide. Configure your API key to support routing capabilities.
routing, raycast, REST API