code: function(bounds, closest) {
          if (!(bounds instanceof OpenLayers.Bounds)) {
              bounds = new OpenLayers.Bounds(bounds);
          }
          var center = bounds.getCenterLonLat();
          if (this.baseLayer.wrapDateLine) {
              var maxExtent = this.getMaxExtent();
  
              //fix straddling bounds (in the case of a bbox that straddles the 
              // dateline, it's left and right boundaries will appear backwards. 
              // we fix this by allowing a right value that is greater than the
              // max value at the dateline -- this allows us to pass a valid 
              // bounds to calculate zoom)
              //
              bounds = bounds.clone();
              while (bounds.right < bounds.left) {
                  bounds.right += maxExtent.getWidth();
              }
              //if the bounds was straddling (see above), then the center point 
              // we got from it was wrong. So we take our new bounds and ask it
              // for the center.
              //
              center = bounds.getCenterLonLat().wrapDateLine(maxExtent);
          }
          this.setCenter(center, this.getZoomForExtent(bounds, closest));
      }
docs: APIMethod: zoomToExtent
  Zoom to the passed in bounds, recenter
  
  Parameters:
  bounds - {<OpenLayers.Bounds>|Array} If provided as an array, the array
  should consist of four values (left, bottom, right, top).
  closest - {Boolean} Find the zoom level that most closely fits the
  specified bounds. Note that this may result in a zoom that does
  not exactly contain the entire extent.
  Default is false.