smeijer / leaflet-geosearch

A geocoding/address-lookup library supporting various api providers.
https://smeijer.github.io/leaflet-geosearch/
MIT License
1.02k stars 270 forks source link

Required update: Use the new ArcGIS geocoding endpoint #318

Open ak-kemp opened 2 years ago

ak-kemp commented 2 years ago

There are two required updates to the URL in esriProvider.ts.

  1. The geocode.arcgis.com URL must be updated to use the new endpoint: geocode-api.arcgis.com to make authenticated requests via an API key or OAuth token to access the service.
  2. The find operation is deprecated. You will need to use findAddressCandidates.

Current

    'https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find';

Required update

    'https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates/token=<YOUR_API_KEY>'

What this entails

A user will need an ArcGIS account and an API key scoped to access the Geocoding service.