Add ol.geom.LineString#intersectsExtent

This commit is contained in:
Éric Lemoine
2014-09-11 23:12:18 +02:00
parent d1f6f132d6
commit 8d7cf7960a

View File

@@ -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.<ol.Coordinate>} coordinates Coordinates.
* @param {ol.geom.GeometryLayout=} opt_layout Layout.