Merge pull request #12731 from ahocevar/user-resolution

Handle resolution and tile loadingstrategy with user projection
This commit is contained in:
Andreas Hocevar
2021-09-10 17:52:48 +02:00
committed by GitHub
8 changed files with 206 additions and 9 deletions

View File

@@ -26,7 +26,7 @@ import {xhr} from '../featureloader.js';
* returns an array of {@link module:ol/extent~Extent} with the extents to load. Usually this
* is one of the standard {@link module:ol/loadingstrategy} strategies.
*
* @typedef {function(import("../extent.js").Extent, number): Array<import("../extent.js").Extent>} LoadingStrategy
* @typedef {function(import("../extent.js").Extent, number, import("../proj/Projection.js").default): Array<import("../extent.js").Extent>} LoadingStrategy
* @api
*/
@@ -939,7 +939,7 @@ class VectorSource extends Source {
*/
loadFeatures(extent, resolution, projection) {
const loadedExtentsRtree = this.loadedExtentsRtree_;
const extentsToLoad = this.strategy_(extent, resolution);
const extentsToLoad = this.strategy_(extent, resolution, projection);
for (let i = 0, ii = extentsToLoad.length; i < ii; ++i) {
const extentToLoad = extentsToLoad[i];
const alreadyLoaded = loadedExtentsRtree.forEachInExtent(