diff --git a/src/ol/filter/extentfilter.js b/src/ol/filter/extentfilter.js new file mode 100644 index 0000000000..3a566c2490 --- /dev/null +++ b/src/ol/filter/extentfilter.js @@ -0,0 +1,36 @@ +goog.provide('ol.filter.Extent'); + +goog.require('ol.Feature'); + + + +/** + * @constructor + * @implements {ol.filter.Filter} + * @param {ol.Extent} extent The extent. + */ +ol.filter.Extent = function(extent) { + + /** + * @type {ol.Extent} + * @private + */ + this.extent_ = extent; + +}; + + +/** + * @return {ol.Extent} The filter extent. + */ +ol.filter.Extent.prototype.getExtent = function() { + return this.extent_; +}; + + +/** + * @inheritDoc + */ +ol.filter.Extent.prototype.evaluate = function(feature) { + return feature.getGeometry().getBounds().intersects(this.extent_); +}; diff --git a/src/ol/filter/logicalfilter.js b/src/ol/filter/logicalfilter.js new file mode 100644 index 0000000000..b702958684 --- /dev/null +++ b/src/ol/filter/logicalfilter.js @@ -0,0 +1,62 @@ +goog.provide('ol.filter.Logical'); +goog.provide('ol.filter.LogicalOperator'); + +goog.require('ol.Feature'); +goog.require('ol.filter.Filter'); + + + +/** + * @constructor + * @implements {ol.filter.Filter} + * @param {Array.