code: function(map) {
          this.map = map;
          this.cache = {};
          map.events.register("mousedown", this, this.start, {extension: true});
          map.events.register("mouseup", this, this.onClick, {extension: true});
          map.events.register("touchstart", this, this.start, {extension: true});
          map.events.register("touchmove", this, this.cancel, {extension: true});
          map.events.register("touchend", this, this.onClick, {extension: true});
          map.events.register("mousemove", this, this.onMousemove, {extension: true});
      }
docs: Method: setMap
  
  Parameters:
  map - {<OpenLayers.Map>} The map to register browser events on.