code: function(map) {
          OpenLayers.Layer.Vector.prototype.setMap.apply(this, arguments);
          this.collectRoots();
          map.events.register("changelayer", this, this.handleChangeLayer);
      }
docs: Method: setMap
  
  Parameters:
  map - {<OpenLayers.Map>}