Do not render layer when outside extent
This commit is contained in:
@@ -26,6 +26,7 @@ import {
|
||||
import {fromUserExtent} from '../../proj.js';
|
||||
import {getIntersection} from '../../extent.js';
|
||||
import {getUid} from '../../util.js';
|
||||
import {isEmpty} from '../../extent.js';
|
||||
import {numberSafeCompareFunction} from '../../array.js';
|
||||
import {toSize} from '../../size.js';
|
||||
|
||||
@@ -207,6 +208,9 @@ class WebGLTileLayerRenderer extends WebGLLayerRenderer {
|
||||
fromUserExtent(layerState.extent, viewState.projection)
|
||||
);
|
||||
}
|
||||
if (isEmpty(extent)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const tileLayer = this.getLayer();
|
||||
const tileSource = tileLayer.getSource();
|
||||
|
||||
Reference in New Issue
Block a user