diff --git a/src/ol/geom/linestring.js b/src/ol/geom/linestring.js index a7027e4b72..7e2bcf74c5 100644 --- a/src/ol/geom/linestring.js +++ b/src/ol/geom/linestring.js @@ -9,6 +9,7 @@ goog.require('ol.geom.flat.closest'); goog.require('ol.geom.flat.deflate'); goog.require('ol.geom.flat.inflate'); goog.require('ol.geom.flat.interpolate'); +goog.require('ol.geom.flat.intersectsextent'); goog.require('ol.geom.flat.length'); goog.require('ol.geom.flat.simplify'); @@ -190,6 +191,17 @@ ol.geom.LineString.prototype.getType = function() { }; +/** + * @inheritDoc + * @api + */ +ol.geom.LineString.prototype.intersectsExtent = function(extent) { + return ol.geom.flat.intersectsextent.lineString( + this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, + extent); +}; + + /** * @param {Array.