Use getLoadWrapX() to determine extent to load

This commit is contained in:
mike-000
2020-03-28 21:10:41 +00:00
committed by Andreas Hocevar
parent b560dab513
commit 3b760dc308

View File

@@ -375,8 +375,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
const gutter = Math.max(getWidth(extent) / 2, worldWidth);
extent[0] = projectionExtent[0] - gutter;
extent[2] = projectionExtent[2] + gutter;
// Except for Graticule use this for loading features
if (typeof /** @type {?} */ (vectorLayer).getMeridians !== 'function') {
if (vectorSource.getLoadWrapX()) {
loadExtent = extent;
}
const worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth);