ジオコーダーの検索フィーチャーレイヤーのオプションを使おうとしています(Searching feature layers | Esri Leaflet)、しかし私のフィーチャーレイヤーはプライベートです。ドキュメントを見て、arcgisonline プロバイダーの token プロパティを使えば動作すると思ったのですが、うまくいっていないようです。何か間違っていることをしているかご存知の方はいらっしゃいますか?コードサンプルを含めています。<\/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
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.