code: function(layers) {
          var isActive = this.active;
          this.unselectAll();
          this.deactivate();
          if(this.layers) {
              this.layer.destroy();
              this.layers = null;
          }
          this.initLayer(layers);
          this.handlers.feature.layer = this.layer;
          if (isActive) {
              this.activate();
          }
      }
docs: APIMethod: setLayer
  Attach a new layer to the control, overriding any existing layers.
  
  Parameters:
  layers - Array of {<OpenLayers.Layer.Vector>} or a single
  {<OpenLayers.Layer.Vector>}