serviceArea
FunctionserviceArea(requestOptions: IServiceAreaOptions): 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.
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
| Parameter | Type | Notes | 
|---|---|---|
| request | IServiceAreaOptions | Options to pass through to the routing service. | 
Returns
Promise<IServiceAreaResponse>A Promise that will resolve with service area polygons for the request.