code: function(zoom) {
          if (this.baseLayer && this.baseLayer.wrapDateLine) {
              var resolution, resolutions = this.baseLayer.resolutions,
                  maxResolution = this.getMaxExtent().getWidth() / this.size.w;
              if (this.getResolutionForZoom(zoom) > maxResolution) {
                  if (this.fractionalZoom) {
                      zoom = this.getZoomForResolution(maxResolution);
                  } else {
                      for (var i=zoom|0, ii=resolutions.length; i<ii; ++i) {
                          if (resolutions[i] <= maxResolution) {
                              zoom = i;
                              break;
                          }
                      }
                  } 
              }
          }
          return zoom;
      }
docs: Method: adjustZoom
  
  Parameters:
  zoom - {Number} The zoom level to adjust
  
  Returns:
  {Integer} Adjusted zoom level that shows a map not wider than its
  <baseLayer>'s maxExtent.