AnsweredAssumed Answered

How do I remove basemaps from the default 4.7 BasemapGallery?

Question asked by jbrowning_TRIO on Jul 2, 2018
Latest reply on Jul 2, 2018 by jbrowning_TRIO



I'm trying to use the default BasemapGallery widget with my 4.7 ArcGIS JS application - but only with 4 of the basemaps. The others are superfluous for the app. I know that the BasemapGallery has a Collection of Basemap objects, but I can't seem to access it. For instance, the below code doesn't clear a basemap from the BasemapGallery:


var basemapGallery = new BasemapGallery({
view: view,
container: document.createElement("div")

basemapGallery.viewModel.items.removeAt(2); //does not work


How do I do this?


Thanks so much,