code: function() {
          if (this.layer.map === null) {
              return null;
          }
          var bounds = this.layer.map.getExtent();
          if(bounds && !this.layer.projection.equals(
                  this.layer.map.getProjectionObject())) {
              bounds = bounds.clone().transform(
                  this.layer.map.getProjectionObject(), this.layer.projection
              );
          }
          return bounds;
      }
docs: Method: getMapBounds
  Get the map bounds expressed in the same projection as this layer.
  
  Returns:
  {<OpenLayers.Bounds>} Map bounds in the projection of the layer.