reverseGeocode

reverseGeocode

reverseGeocode(coordsIPoint | ILocation | [voidvoid], requestOptions?IEndpointOptions): Promise<IReverseGeocodeResponse>

Used to determine the address of a location.

Use dark colors for code blocksCopy
           
1
2
3
4
5
6
7
8
9
10
11
import { reverseGeocode } from '@esri/arcgis-rest-geocoding';
//
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 })
Parameters
ParameterTypeNotes
coords
IPoint | ILocation | [voidvoid]
requestOptions
IEndpointOptions

Additional options for the request including authentication.

Returns 
Promise<IReverseGeocodeResponse>

A Promise that will resolve with the data from the response.

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