Closed kjrhody closed 2 years ago
Thank you for the question. At version 3.0.0, Esri Leaflet Geocoder switched the default geocoding url from https://geocode.arcgis.com/...
to https://geocode-api.arcgis.com/....
The reverse geocode that Esri Leaflet Geocoder is doing looks like this:
As you can see if you click those two links, the first one succeeds but the latter returns the token error. I need to get some additional informtion on this before I can tell you what is the expected behavior, but a short-term workaround would be for you to switch to using the v2.* version of the library: https://unpkg.com/esri-leaflet-geocoder@2.3.4/dist/esri-leaflet-geocoder.js if you use that, it will use https://geocode.arcgis.com...
and give you the behavior you had previously (see demo here)
@gavinr Thank you so much for your quick response! To test, I updated the reference in our code with the URL you suggested, and that does indeed fix the issue! Really appreciate your help.
The documentation here was updated to explain token/apikey requirements for https://geocode-api.arcgis.com
, the endpoint that esri-leaflet-geocoder
uses by default:
Describe the bug
Under the terms described in the ArcGIS Developer documentation, we had been using the
L.esri.Geocoding.reverseGeocode()
function from this library under the free requirements, and without the need to provide a token parameter. But recently we started not receiving a response, and receiving an error that says we need to provide a token. So, two questions:Thanks for any help.
Reproduction
Logs
Printing out
error
returnsPrinting out
result
andresponse
returnsundefined
andnull
respectively, which results in our code failing to return anything:System Info
Additional Information
No response