code: function() {
          var extent = null;
          if (this.sphericalMercator) {
              extent = this.map.calculateBounds();
          } else {
              extent = OpenLayers.Layer.FixedZoomLevels.prototype.getExtent.apply(this);
          }
          return extent;
      }
docs: Method: getExtent
  Get the map's extent.
  
  Returns:
  {<OpenLayers.Bounds>} The map extent.