//Listener on an ExtJS Component listeners: { 'checkchange': function(node, checked){ if(checked){ node.getUI().addClass('complete'); var size = node.parentNode.childNodes.length; for(var i=0;i<size;i++) { if(node.parentNode.childNodes.id != node.id) { node.parentNode.childNodes.ui.checkbox.checked = false; Ext.getCmp('mappanel).setLayerVisibility(node.parentNode.childNodes.id, false); }else { Ext.getCmp('mappanel).setLayerVisibility(node.id, true); } } }else{ node.getUI().removeClass('complete'); } } } //function definition in ExtJS setLayerVisibility: function(id, visible) { var size = this.oLayer.length; //in this array all layers/services are saved for(var i=0;i<size;i++) { if(this.oLayer.id == id) { if(visible) this.oLayer.show(); else this.oLayer.hide(); } } }
I have difficulty regarding the toggling between two layers as i have many layers in my application and i want to toggel betweeen basemap and imagery in my project using two radio button.Please as soon as possible And thank You in advance,
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.