Select to view content in your preferred language

esriLeafletGeocoder app testing

712
1
08-14-2022 12:46 PM
Labels (1)
AntonioPavicevac-Ortiz
New Contributor

While testing my app like so:

 

 

 

 

esriLeafletGeocoder
  .reverseGeocode({
  apikey: process.env.ESRI_API_KEY,
})
.latlng([48.8583, 2.2945])
.run(function (error, results, response) {
  if (error) {
    console.log("error", error);
    return;
  }
console.log("results, response ", results, response);
});

 

 

 

 

I suddenly began receiving the following error:

  error {code: 403, subcode: 2, message: "User does not have permissions to access 'world.geocodeserver'.", details: Array(0)}

Which led me to check ArcGIS Developers developers website, I'm on the free free tier, but what if you are testing something with the same lat/lng?

Is there a best practice I should be following to cache this result so I don't get rate limited?

 

Tags (1)
0 Kudos
1 Reply
John-Foster
Esri Contributor

the first question that comes up is what type of ArcGIS account are you using to access the geocode service? See https://developers.arcgis.com/documentation/mapping-apis-and-services/get-started/. If you are using an ArcGIS Developer account with an API key then check the API key scope to make sure geocoding (not stored or stored depending how you are using and paying for the service) is set. If you are using an ArcGIS Online account then make sure the user the key is assigned to also has the geocoding privilege (the administration can disable this). Next, verify you have free tier remaining (if using not stored service) or Pay as you go turned on.

Regarding caching, if you are using geocode (not stored) then caching the geocode results is against the Terms of Use. But if you are using the geocode service with the for storage parameter set then you may cache those results.

--jf
0 Kudos