Merge pull request #13269 from mike-000/TileTexture-tilePixelRatio-gutter

Pass tilePixelRatio and gutter to TileTexture
This commit is contained in:
Tim Schaub
2022-02-07 13:45:22 -07:00
committed by GitHub
6 changed files with 112 additions and 10 deletions
+10 -1
View File
@@ -308,6 +308,9 @@ class WebGLTileLayerRenderer extends WebGLLayerRenderer {
const tileLayer = this.getLayer();
const tileSource = tileLayer.getRenderSource();
const tileGrid = tileSource.getTileGridForProjection(viewState.projection);
const tilePixelRatio = tileSource.getTilePixelRatio(frameState.pixelRatio);
const gutter = tileSource.getGutterForProjection(viewState.projection);
const tileTextureCache = this.tileTextureCache_;
const tileRange = tileGrid.getTileRangeForExtentAndZ(
extent,
@@ -352,7 +355,13 @@ class WebGLTileLayerRenderer extends WebGLLayerRenderer {
viewState.projection
);
if (!tileTexture) {
tileTexture = new TileTexture(tile, tileGrid, this.helper);
tileTexture = new TileTexture(
tile,
tileGrid,
this.helper,
tilePixelRatio,
gutter
);
tileTextureCache.set(cacheKey, tileTexture);
} else {
if (this.isDrawableTile_(tile)) {