serviceArea

serviceArea

serviceArea(requestOptionsIServiceAreaOptions): Promise<IServiceAreaResponse>

Used to find the area that can be reached from the input location within a given travel time or travel distance. See the REST Documentation for more information.

Use dark colors for code blocksCopy
           
1
2
3
4
5
6
7
8
9
10
11
import { serviceArea } from '@esri/arcgis-rest-routing';

serviceArea({
  facilities: [
    [-90.444716, 38.635501],
    [-90.311919, 38.633523],
    [-90.451147, 38.581107]
   ],
   authentication
})
  .then(response) // => {routes: {features: [{attributes: { ... }, geometry:{ ... }}]}
Parameters
ParameterTypeNotes
requestOptions
IServiceAreaOptions

Options to pass through to the routing service.

Returns 
Promise<IServiceAreaResponse>

A Promise that will resolve with service area polygons for the request.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.