I've added my custom basemap to my basemap gallery but can't figure out how to add other basemaps.
var customBMs = new LocalBasemapsSource(
{
basemaps:[
bm,
Basemap.fromId("OS Open Background"),
Basemap.fromId("OS Open Carto"),
Basemap.fromId("OS Open Grey Labels"),
Basemap.fromId("OS Open Grey"),
Basemap.fromId("OS Open Rasters")
]
}
);
var basemapGallery = new BasemapGallery({
view: view,
source:customBMs
});
What id do I use for the OS Open maps? I've tried portal ids with no luck
Solved! Go to Solution.
Got it to work by just pushing to the existing basemapGallery.source.basemaps.items array instead of providing a new one
Shakil,
All basemaps have to have the same spatial reference and be cached at the same LODs.
Got it to work by just pushing to the existing basemapGallery.source.basemaps.items array instead of providing a new one