From 1dc4219314ed1477dc115287a64fa2e76e245253 Mon Sep 17 00:00:00 2001 From: fuzhenn Date: Mon, 26 Feb 2024 16:13:31 +0800 Subject: [PATCH] fix missed parent tiles when TileLayer in terrain, close maptalks/issues#608 --- src/renderer/layer/tilelayer/TileLayerCanvasRenderer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/layer/tilelayer/TileLayerCanvasRenderer.js b/src/renderer/layer/tilelayer/TileLayerCanvasRenderer.js index 38c1ff89a..675256b6f 100644 --- a/src/renderer/layer/tilelayer/TileLayerCanvasRenderer.js +++ b/src/renderer/layer/tilelayer/TileLayerCanvasRenderer.js @@ -187,7 +187,8 @@ class TileLayerCanvasRenderer extends CanvasRenderer { const loadingLimit = this._getLoadLimit(); const l = tileGrids.length; - const isFirstRender = layer.options['currentTilesFirst'] && this._tileZoom === undefined; + // !this._terrainHelper can't be deleted as parent tiles are part of terrain skin, maptalks/issues#608 + const isFirstRender = this._tileZoom === undefined && layer.options['currentTilesFirst'] && !this._terrainHelper; // main tile grid is the last one (draws on top) this._tileZoom = tileGrids[0]['zoom'];