code: function(visibility) {
          if (visibility != this.visibility) {
              this.visibility = visibility;
              this.display(visibility);
              this.redraw();
              if (this.map != null) {
                  this.map.events.triggerEvent("changelayer", {
                      layer: this,
                      property: "visibility"
                  });
              }
              this.events.triggerEvent("visibilitychanged");
          }
      }
docs: APIMethod: setVisibility
  Set the visibility flag for the layer and hide/show & redraw
  accordingly. Fire event unless otherwise specified
  
  Note that visibility is no longer simply whether or not the layer's
  style.display is set to "block". Now we store a 'visibility' state
  property on the layer class, this allows us to remember whether or
  not we *desire* for a layer to be visible. In the case where the
  map's resolution is out of the layer's range, this desire may be
  subverted.
  
  Parameters:
  visibility - {Boolean} Whether or not to display the layer (if in range)