reverseGeocode

Function

import { reverseGeocode } from '@esri/arcgis-rest-geocoder';
//
reverseGeocode([-118.409,33.943 ]) // long, lat
  .then((response) => {
    response.address.PlaceName; // => "LA Airport"
  });
// or
reverseGeocode({ long: -118.409, lat: 33.943 })
reverseGeocode({ latitude: 33.943, latitude: -118.409 })
reverseGeocode({ x: -118.409, y: 33.9425 }) // wgs84 is assumed
reverseGeocode({ x: -13181226, y: 4021085, spatialReference: { wkid: 3857 })

Used to determine the address of a location.

Parameters

Parameter Type Default Notes
coords Required IPoint | ILocation | [number, number]
requestOptions Optional IEndpointRequestOptions

Additional options for the request including authentication.

Returns

Promise<IReverseGeocodeResponse> - A Promise that will resolve with the data from the response.


Function defined in packages/arcgis-rest-geocoder/src/reverse.ts:51