Routing helpers for ArcGIS REST JS.
Install
npm install @esri/arcgis-rest-routing
Import
@esri/arcgis-rest-routing
is distributed as both ES Modules and Common JS modules.
import * as routingTools from "@esri/arcgis-rest-routing"
const routingTools = require("@esri/arcgis-rest-routing");
CDN
You can use @esri/arcgis-rest-routing
as an ES Module from the esm.run CDN.
<script type="module">
import * as routingTools from "https://esm.run/@esri/arcgis-rest-routing@4.0.3";
</script>
You can also use @esri/arcgis-rest-routing
from a script tag. All exports will be added to a global arcgisRest
object.
<script
src="https://unpkg.com/@esri/arcgis-rest-routing@4.0.3/dist/bundled/routing.umd.min.js"
integrity="sha512-h19QmOhrk5jZUZi4Sd7fsEVUjLCeHuszxkb7EKE6zqQTZyX/gbwnXxYPTHMrsNLGHbzyEhPVHw/MtDXriJ8tNA==">
</script>
Exports
- closestFacility
- decompressGeometry
- isFeatureSet
- isJsonWithURL
- normalizeLocationsList
- originDestinationMatrix
- serviceArea
- solveRoute
- IClosestFacilityOptions
- IClosestFacilityResponse
- IEndpointOptions
- IFeature
- IFeatureSet
- ILocation
- IOriginDestinationMatrixOptions
- IOriginDestinationMatrixResponse
- IPoint
- IPolyline
- IRequestOptions
- IServiceAreaOptions
- IServiceAreaResponse
- ISolveRouteOptions
- ISolveRouteResponse
- ARCGIS_ONLINE_CLOSEST_FACILITY_URL
- ARCGIS_ONLINE_ORIGIN_DESTINATION_MATRIX_URL
- ARCGIS_ONLINE_ROUTING_URL
- ARCGIS_ONLINE_SERVICE_AREA_URL
- Position2D