Closed sjshank closed 6 years ago
if you update to the latest release you should experience more consistent behavior.
see #173 for more info.
if you're calling the service over and over again to geocode addresses in bulk you'll need to pass forStorage=true&token=[your token]
in your requests as well.
Thank you John for solution. It worked. However, I need some info on token. How can I get a token without expiration date ? Did arcgis provide token on buying paid token ?
happy to help.
How can I get a token without expiration date?
It isn't possible to create a token without an expiration date, but you can create a hosted service proxy to simplify authenticating/storing results.
// you'll need to create and substitute a service proxy of your own
const url = `https://utility.arcgis.com/usrsvcs/appservices/${yours}/rest/services/World/GeocodeServer/`;
const geocoder = L.esri.Geocoding.geocodeService({ url });
const address = 'London, UK'
geocoder.geocode().text(address).forStorage(true).run(function (error, response) {
console.log(response)
});
You can find more information about authenticating in ArcGIS Online to access premium services:
if you're interested in batch geocoding, you might also want to check out ArcGIS REST JS.
Hi,
I am using leaflet, esri-leaflet and leaflet-geocoder for rendering MAP, pointing geolocation on MAP and converting text address into lat long. However, I am oftenly receiving error from leaflet-geocoder while making calls to convert text address into geo location. Error : SERVICE UNAVAILABLE - The service is temporarily overloaded. 503 Server call : (XHR)GET - https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find?outSr=4326&forStorage=false&outFields=*&maxLocations=20&text=80%20Victoria%20St%2C%20London%2C%20SW1E%205JL%2C%20United%20Kingdom&f=json
It's a random call getting failed.
can anyone help me out here ?