diff --git a/modules/carto/src/layers/post-process-utils.ts b/modules/carto/src/layers/post-process-utils.ts index aa525acefc8..e77648394bc 100644 --- a/modules/carto/src/layers/post-process-utils.ts +++ b/modules/carto/src/layers/post-process-utils.ts @@ -76,15 +76,16 @@ export function RTTModifier>(BaseLayer: T): T { const {shaderModuleProps} = opts; const {picking} = shaderModuleProps; const postProcessLayer = getPostProcessLayer(this); + const enableRTT = !picking.isActive && postProcessLayer.enableRTT; - if (!picking.isActive) { + if (enableRTT) { postProcessLayer.enableRTT(opts); } // Draw actual layer super.draw(opts); - if (!picking.isActive) { + if (enableRTT) { postProcessLayer.disableRTT(); } } diff --git a/modules/carto/src/layers/raster-layer.ts b/modules/carto/src/layers/raster-layer.ts index d885ada689c..75e47e769e1 100644 --- a/modules/carto/src/layers/raster-layer.ts +++ b/modules/carto/src/layers/raster-layer.ts @@ -115,7 +115,7 @@ export default class RasterLayer extends Composite tileIndex, updateTriggers } = this.props as typeof this.props & {data: Raster}; - if (!data || !tileIndex) return null; + if (!data || !tileIndex || (data as any).length === 0) return null; const blockSize = data.blockSize ?? 0; const [xOffset, yOffset, scale] = quadbinToOffset(tileIndex);