bikeLayer.hide(); mopedLayer.hide(); atmLayer.hide(); recLayer.hide(); foodLayer.hide();
Is there a way to use layer.hide(); for multiple layers in a single function?... if only atmLayer is on, it won't shut off, with the error that bikeLayer is not defined
//define the array of layers - add each layer as it's created var mapLayers = []; mapLayers.add(bikeLayer); mapLayers.add(atmLayer); //etc //To switch off the layers for (var i = 0; i < mapLayers.length - 1; i++) { mapLayers.hide() }
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.