Estou tentando usar a opção de camadas de recurso de pesquisa para geocoder (Camadas de recurso de pesquisa | Esri Leaflet), mas minha camada de recurso é privada. Olhando a documentação, pensei que se eu usasse a propriedade token para o provedor arcgisonline isso funcionaria, mas parece que não está funcionando. Alguém sabe se estou fazendo algo errado? Estou incluindo meu exemplo de código.<\/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
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.