title: ArcGis javascript api 3.5 how to set visibility of a feature layer
body: <p>i am using ArcGis javascript api 3.5 and my code is</p>
  
  <pre><code> map = new esri.Map("mapDiv", {
              basemap: "streets",
              center: [-112.07102547942392, 46.75909704205151],
              zoom: 12,
              slider: false,
              infoWindow: infoWindow
          });
  
  
  
  
          var featureLayer = new esri.layers.FeatureLayer("http:/abc/arcgis/rest/services/MTARNG/MapServer/1", {
              mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,
              infoTemplate: templateFuze,
              outFields: ["*"]
          });
          var featureLayer1 = new esri.layers.FeatureLayer("http://abc/arcgis/rest/services/MTARNG/MapServer/0", {
              mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,
              infoTemplate: templateParcel,
              outFields: ["*"]
          });
          var featureLayer2 = new esri.layers.FeatureLayer("http://abc/arcgis/rest/services/MTARNG/MapServer/2", {
              mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,
              infoTemplate: templateGrid,
              outFields: ["*"]
          });
  
              Ext.create('Ext.form.Panel', {
                  width: 400,
                  height: 600,
                  bodyPadding: 10,
                  renderTo: Ext.get('LayerDiv'),
                  items: [{
                      xtype: 'checkboxgroup',
                      columns: 1,
                      vertical: true,
                      items: layerInfo,
                      listeners: {
  
                          change: {
                              fn: function (checkbox, checked) {
                                  for (var i = 0; i &lt; checkbox.items.items.length; i++) {
                                      if (checkbox.items.items[i].checked) {
                                          //visible true checkbox.items.items[0].boxLabel                                        
  
                                      }
                                      else {
                                          //visible false 
                                      }
                                  }
                              }
                          }
                      }
                  }]
              });
  
          });
  </code></pre>
  
  <p>So i am trying to set the visibilty of the layer but i am not able to do. after that how to refresh the map ?</p>
  
  <p>I got some function but it is working e.g.-  visibleAtMapScale = false,
  defaultVisibility = false and for refreshing i got only map.resize=true;</p>
  
  <p>What else i can try to achive this functionality.</p>