Dear All,
I am developing one application using ArcGIS JS Script 4.22 . In that application I need to use basemap layer of OSI. OSI has provided a REST service link. When I use that link it asking for username and password. Basemap REST link was published in the ArcGIS online where other feature layers are published. I understand that key is needed to avoid prompting login. Could you please help me how can I create key in ArcGIS online and how I have use along with the link in the code.
Could you please assist me in this regard, since it is very urgent.
Best Regards,
K.Jayakumar
Hi @jkumartry1980, the documentation here should provide you with some good insight:
https://developers.arcgis.com/javascript/latest/arcgis-organization-portals/
https://developers.arcgis.com/javascript/latest/secure-resources/
Hi,
Thanks for the reply. I tried the following code to use this layer as basemap
const imageTileLayer = new TileLayer({
portalItem: {
id: "7c57414b0aad4cbc9999ad2be8d9a069"
}
});
const basemap = new Basemap({
baseLayers: [
imageTileLayer
]
});
map = new Map({
basemap: basemap
});
The particular layer was published in the ArcGIS online (Datasource URL