From 3a8504b7995a1190ed05983ffd4635b5bceb6e93 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 6 Mar 2014 14:57:56 +0100 Subject: [PATCH] Add ol.source.Vector#forEachFeatureInExtentAtResolution --- src/ol/source/vectorsource.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ol/source/vectorsource.js b/src/ol/source/vectorsource.js index 6c5659ab3d..94ab64349a 100644 --- a/src/ol/source/vectorsource.js +++ b/src/ol/source/vectorsource.js @@ -208,6 +208,21 @@ ol.source.Vector.prototype.forEachFeatureInExtent = }; +/** + * @param {ol.Extent} extent Extent. + * @param {number} resolution Resolution. + * @param {function(this: T, ol.Feature): S} f Callback. + * @param {T=} opt_this The object to use as `this` in `f`. + * @return {S|undefined} + * @template T,S + * @todo stability experimental + */ +ol.source.Vector.prototype.forEachFeatureInExtentAtResolution = + function(extent, resolution, f, opt_this) { + return this.forEachFeatureInExtent(extent, f, opt_this); +}; + + /** * @return {Array.} Features. * @todo stability experimental