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