Add ol.geom.GeometryCollection#intersectsExtent

This commit is contained in:
Éric Lemoine
2014-09-17 07:58:12 +02:00
parent 92c2aca480
commit 88911200c2

View File

@@ -218,6 +218,22 @@ ol.geom.GeometryCollection.prototype.getType = function() {
};
/**
* @inheritDoc
* @api
*/
ol.geom.GeometryCollection.prototype.intersectsExtent = function(extent) {
var geometries = this.geometries_;
var i, ii;
for (i = 0, ii = geometries.length; i < ii; ++i) {
if (geometries[i].intersectsExtent(extent)) {
return true;
}
}
return false;
};
/**
* @return {boolean} Is empty.
*/