From 2c2649a05b09a9feb8ee7b0b7128dcefbbc4b710 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Thu, 14 Oct 2021 17:54:43 +0200 Subject: [PATCH] Fix PDF export: filtered layers are removed. Fix #514 --- UI/ExportPDF.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/UI/ExportPDF.ts b/UI/ExportPDF.ts index 1bb57fb1c2..074efc379a 100644 --- a/UI/ExportPDF.ts +++ b/UI/ExportPDF.ts @@ -87,12 +87,16 @@ export default class ExportPDF { minimap.leafletMap .addCallbackAndRunD(leaflet => { const bounds = BBox.fromLeafletBounds(leaflet.getBounds().pad(0.2)) options.features.GetTilesPerLayerWithin(bounds, tile => { + if(tile.layer.layerDef.minzoom > l.zoom){ + return + } new ShowDataLayer( { features: tile, leafletMap: minimap.leafletMap, layerToShow: tile.layer.layerDef, - enablePopups: false + enablePopups: false, + doShowLayer: tile.layer.isDisplayed } ) })