Support the wrapX option for WebGL rendered tile sources

This commit is contained in:
Tim Schaub
2022-01-11 12:48:49 -07:00
parent 1f761d943f
commit 647a0d8ece
3 changed files with 30 additions and 1 deletions

View File

@@ -100,7 +100,9 @@ function getRenderExtent(frameState, extent) {
const source =
/** {import("../../source/Tile.js").default} */ layerState.layer.getSource();
if (!source.getWrapX()) {
const gridExtent = source.tileGrid.getExtent();
const gridExtent = source
.getTileGridForProjection(frameState.viewState.projection)
.getExtent();
if (gridExtent) {
extent = getIntersection(extent, gridExtent);
}