code: function(feature) {
          var intersect = false;
          switch(this.type) {
              case OpenLayers.Filter.Spatial.BBOX:
              case OpenLayers.Filter.Spatial.INTERSECTS:
                  if(feature.geometry) {
                      var geom = this.value;
                      if(this.value.CLASS_NAME == "OpenLayers.Bounds") {
                          geom = this.value.toGeometry();
                      }
                      if(feature.geometry.intersects(geom)) {
                          intersect = true;
                      }
                  }
                  break;
              default:
                  throw new Error('evaluate is not implemented for this filter type.');
          }
          return intersect;
      }
docs: Constructor: OpenLayers.Filter.Spatial
  Creates a spatial filter.
  
  Parameters:
  options - {Object} An optional object with properties to set on the
  filter.
  
  Returns:
  {<OpenLayers.Filter.Spatial>}
   
  Method: evaluate
  Evaluates this filter for a specific feature.
  
  Parameters:
  feature - {<OpenLayers.Feature.Vector>} feature to apply the filter to.
  
  Returns:
  {Boolean} The feature meets filter criteria.