code: function () {
          var maxExtent = null;
          var features = this.features;
          if(features && (features.length > 0)) {
              var geometry = null;
              for(var i=0, len=features.length; i<len; i++) {
                  geometry = features[i].geometry;
                  if (geometry) {
                      if (maxExtent === null) {
                          maxExtent = new OpenLayers.Bounds();
                      }
                      maxExtent.extend(geometry.getBounds());
                  }
              }
          }
          return maxExtent;
      }
docs: APIMethod: getDataExtent
  Calculates the max extent which includes all of the features.
  
  Returns:
  {<OpenLayers.Bounds>} or null if the layer has no features with
  geometries.