AnsweredAssumed Answered

Adapt basemap collection in Dijit BasemapGallery

Question asked by csa_egregis on Dec 12, 2014
Latest reply on Dec 16, 2014 by csa_egregis
  • Esri has adapted the collection of Basemaps in its BasemapGallery Dijit.


To include the Basemap Gallery in your App, it's just needs;


var basemapGallery = new BasemapGallery({

  showArcGISBasemaps: true,

  map: map

  }, "basemapGallery");



But when you want remove one of this 10 basemap-layers you have to add


basemapGallery.remove(id);  //p.e. basemapGallery.remove("basemap_0");



this command you cannot add just after basemapGallery.startup() because the basemapGallery Objewct needs first an interaction until the ids are setted (my assumption; is that right?)


So how can you remove one or two basemap layers with this remove-Method instead of writing every layer manually in the kind of Basemap Gallery - user-defined items | ArcGIS API for JavaScript ?


Thanks for help!



PS: Discussion started at