J'essaie d'utiliser l'option de recherche dans les couches de fonctionnalités pour le géocodeur (Recherche dans les couches de fonctionnalités | Esri Leaflet ), mais ma couche de fonctionnalités est privée. En regardant la documentation, je pensais que si j'utilisais la propriété token pour le fournisseur arcgisonline, cela fonctionnerait, mais cela ne semble pas fonctionner. Quelqu'un sait-il si je fais quelque chose de mal ? Je joins mon exemple de code.<\/P>
i don't know exactly what i screwed up, but i was wrong earlier today. tokens are definitely already passed through when they are specified as an option for any of the various providers.
if you update the static token in the jsbin below and perform a search for a US state, the network traffic confirms that the token is passed along in the corresponding requests.
http://jsbin.com/fafexuf/edit?html,output
i'll make a point of updating the documentation.
i took a quick look at this and it looks like we're currently ignoring tokens passed to arcgisOnlineProvider entirely.
the way i envision this working is that 'token' should be a universally understood provider constructor option and that it should be up to the developer to pass an appropriate token to any provider that requires one.
https://github.com/Esri/esri-leaflet-geocoder/issues/177
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.