code: function(dx, dy, options) {
          options = OpenLayers.Util.applyDefaults(options, {
              animate: true,
              dragging: false
          });
          if (options.dragging) {
              if (dx != 0 || dy != 0) {
                  this.moveByPx(dx, dy);
              }
          } else {
              // getCenter
              var centerPx = this.getViewPortPxFromLonLat(this.getCachedCenter());
  
              // adjust
              var newCenterPx = centerPx.add(dx, dy);
  
              if (this.dragging || !newCenterPx.equals(centerPx)) {
                  var newCenterLonLat = this.getLonLatFromViewPortPx(newCenterPx);
                  if (options.animate) {
                      this.panTo(newCenterLonLat);
                  } else {
                      this.moveTo(newCenterLonLat);
                      if(this.dragging) {
                          this.dragging = false;
                          this.events.triggerEvent("moveend");
                      }
                  }    
              }
          }        
  
     }
docs: APIMethod: pan
  Allows user to pan by a value of screen pixels
  
  Parameters:
  dx - {Integer}
  dy - {Integer}
  options - {Object} Options to configure panning:
  - *animate* {Boolean} Use panTo instead of setCenter. Default is true.
  - *dragging* {Boolean} Call setCenter with dragging true.  Default is
  false.