Select to view content in your preferred language

Clear a basemap from the application.

4897
11
Jump to solution
05-24-2017 06:40 AM
Sai_AnandPeketi1
Deactivated User

Hello everyone, 

   By using the basemap widget, the user selects one base map and can change the base maps. Now, the user wants to clear base map from the base map widget.

Is it possible? If yes, How its can anyone share the code. M using the base map gallery sample Basemap gallery | ArcGIS API for JavaScript 3.20 

Thanks for the help.

0 Kudos
11 Replies
JerrySimmons_GISP
Occasional Contributor

Works with minor correction:

layer[i].title

0 Kudos
Sai_AnandPeketi1
Deactivated User

Instead of removing the base map. I added another base map and set the transparency level 100% in the base map gallery widget that resolved my problem. 

layers: [new esri.dijit.BasemapLayer({
URL: "http://services.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer",
opacity: "0"
})

0 Kudos