solveRoute

Function

import { solveRoute } from '@esri/arcgis-rest-routing';
//
solveRoute({
  stops: [
    [-117.195677, 34.056383],
    [-117.918976, 33.812092],
   ],
   authentication
})
  .then(response) // => {routes: {features: [{attributes: { ... }, geometry:{ ... }}]}

Used to find the best way to get from one location to another or to visit several locations. See the REST Documentation for more information.

Parameters

Parameter Type Default Notes
requestOptions Required ISolveRouteRequestOptions

Options to pass through to the routing service.

Returns

Promise<ISolveRouteResponse> - A Promise that will resolve with routes and directions for the request.


Function defined in packages/arcgis-rest-routing/src/solveRoute.ts:59