How can I write the code to turn off the base map, and another code to turn on later?
var bm = map.getLayer("layer0"); bm.setVisibility(false); //to switch off bm.setVisibility(true); //to switch on
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.