From 68e604e3be9fb0eb1e221ab4cffdd2a6b66ab1d7 Mon Sep 17 00:00:00 2001 From: Tomas Burleigh Date: Tue, 24 May 2022 09:46:07 +1200 Subject: [PATCH] VectorSource#getFeaturesInExtent projection renamed to opt_projection and amended jsdoc #13690 --- src/ol/source/Vector.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js index 11446dfbdd..76572b4ba3 100644 --- a/src/ol/source/Vector.js +++ b/src/ol/source/Vector.js @@ -736,19 +736,21 @@ class VectorSource extends Source { * features. * * @param {import("../extent.js").Extent} extent Extent. - * @param {import("../proj/Projection.js").default} [projection] Projection. + * @param {import("../proj/Projection.js").default} [opt_projection] Include features + * where `extent` exceeds the x-axis bounds of `projection` and wraps around the world. * @return {Array>} Features. * @api */ - getFeaturesInExtent(extent, projection) { + getFeaturesInExtent(extent, opt_projection) { if (this.featuresRtree_) { - const multiWorld = projection && projection.canWrapX() && this.getWrapX(); + const multiWorld = + opt_projection && opt_projection.canWrapX() && this.getWrapX(); if (!multiWorld) { return this.featuresRtree_.getInExtent(extent); } - const extents = wrapAndSliceX(extent, projection); + const extents = wrapAndSliceX(extent, opt_projection); return [].concat( ...extents.map((anExtent) => this.featuresRtree_.getInExtent(anExtent))