From 612cf7056058f0f2ac6c1049dfb8164fb9d13343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 17 Sep 2014 07:57:19 +0200 Subject: [PATCH] Add ol.geom.Point#intersectsExtent --- src/ol/geom/point.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ol/geom/point.js b/src/ol/geom/point.js index d030d7a8aa..07ba09ace6 100644 --- a/src/ol/geom/point.js +++ b/src/ol/geom/point.js @@ -93,6 +93,16 @@ ol.geom.Point.prototype.getType = function() { }; +/** + * @inheritDoc + * @api + */ +ol.geom.Point.prototype.intersectsExtent = function(extent) { + return ol.extent.containsXY(extent, + this.flatCoordinates[0], this.flatCoordinates[1]); +}; + + /** * @param {ol.Coordinate} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout.