I created a following basemap in arcgis online using mapbox : https://arcg.is/1zf5qz
I want to use this map as a basemap in my application.
I am trying to follow this example here ArcGIS API for JavaScript Sandbox
The mapBaseLayer urlTemplate contains a http://~xxx.png . Not sure how to use the arcgis online custom maps in arcgis api 4.5
Do I need a png from arcgis online to use my map . If so can you provide an example ?
Solved! Go to Solution.
Basemaps are WebMaps, so you can add it like this.
const map = new EsriMap({
basemap: {
portalItem: {
id: "b74e3eeef31942869c1f611f341ce8ed"
}
}
});
Here is a sample.
I think i figured out the answer. Thanks . Will post it soon.
Basemaps are WebMaps, so you can add it like this.
const map = new EsriMap({
basemap: {
portalItem: {
id: "b74e3eeef31942869c1f611f341ce8ed"
}
}
});
Here is a sample.
How do I find the associated portalItem id ?
Nachi,
It is right in the url you have in your first post:
b74e3eeef31942869c1f611f341ce8ed