Directions
The Directions widget provides a quick and efficient way to calculate directions between two or more locations. The widget generates a route finding a least-cost path between two or more locations using a specified network service. The Directions widget is preconfigured to work with the network analysis services.
Configurable attributes
The following table describes the configurable attributes of the Directions widget.
Attribute | Description |
---|---|
routeTaskUrl | String. The URL for the network route service. The default service could be either of them:
|
geocoderOptions | Object. Defines geocoder options. There is no default.
|
routeOptions | Object. Defines route options. There is no default.
|
Example
{
"routeTaskUrl": "http://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",
"routeOptions": {
"directionsLanguage": "de",
"directionsLengthUnits": "esriKilometers",
"directionsOutputType": "standard",
"impedanceAttribute": "sdfasf"
},
"geocoderOptions": {
"autoComplete": true,
"maxLocations": 6,
"minCharacters": 3,
"searchDelay": 350,
"arcgisGeocoder": false,
"geocoders": [
{
"url": "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",
"placeholder": "asdfasdfasdfa"
}
]
}
}