チームの皆さん、アプリで ArcGIS のベクタータイルを表示するために、オープンソースのライブラリを使おうとしています。このライブラリでは HTTP 認証ヘッダーによる認証が指定されています。ドキュメントによると、サポートされているはずです。https://developers.arcgis.com/documentation/security-and-authentication/reference/http-header-authentication/しかし、一部のエンドポイントでは対応していないようです。たとえば、次のエンドポイントです。https://basemaps-api.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer明示的に token パラメーターを指定する必要があります。このエンドポイントで認証ヘッダーを指定する方法をご確認いただけますか?よろしくお願いします。
On second thought the library may be doing the wrong thing.I see that initial request to get the tiles url contains the token so that should work without the auth header.I don't see an option to delete this post.
@msuk1the way to do this is to call the basemap style service with your authentication token in the header as documented here: https://developers.arcgis.com/rest/basemap-styles/arcgis-navigation-style-get/#token
subsequent tile requests should then supply the token. This is typically done with the mapping library. You can review some of the open-source implementations provided on https://developers.arcgis.com/documentation/#open-source-mapping-libraries, Esri Leaflet is a popular one that demonstrates this.
Thanks John, that's what I realised eventually.The style contains a source field, and the library I amusing was making a subsequent request to the url specified in the source.There's no obvious reason for it so I have asked the library owner to fix it.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.