A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.arcgis.com/arcgis-rest-js/api-reference/arcgis-rest-routing/closestFacility/ below:

closestFacility | ArcGIS REST JS

closestFacility Function closestFacility(requestOptions: IClosestFacilityOptions): Promise<IClosestFacilityResponse>

Used to find a route to the nearest of several possible destinations. See the REST Documentation for more information.

Use dark colors for code blocks Copy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { closestFacility } from '@esri/arcgis-rest-routing';

closestFacility({
  incidents: [
    [-90.404302, 38.600621],
    [-90.364293, 38.620427],
   ],
  facilities: [
    [-90.444716, 38.635501],
    [-90.311919, 38.633523],
    [-90.451147, 38.581107]
   ],
   authentication
})
  .then(response) // => {routes: {features: [{attributes: { ... }, geometry:{ ... }}]}
Returns Promise<IClosestFacilityResponse>

A Promise that will resolve with routes and directions for the request.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4