Fix PDF export: filtered layers are removed. Fix #514

This commit is contained in:
pietervdvn 2021-10-14 17:54:43 +02:00
parent f545575793
commit 2c2649a05b

View file

@ -87,12 +87,16 @@ export default class ExportPDF {
minimap.leafletMap .addCallbackAndRunD(leaflet => { minimap.leafletMap .addCallbackAndRunD(leaflet => {
const bounds = BBox.fromLeafletBounds(leaflet.getBounds().pad(0.2)) const bounds = BBox.fromLeafletBounds(leaflet.getBounds().pad(0.2))
options.features.GetTilesPerLayerWithin(bounds, tile => { options.features.GetTilesPerLayerWithin(bounds, tile => {
if(tile.layer.layerDef.minzoom > l.zoom){
return
}
new ShowDataLayer( new ShowDataLayer(
{ {
features: tile, features: tile,
leafletMap: minimap.leafletMap, leafletMap: minimap.leafletMap,
layerToShow: tile.layer.layerDef, layerToShow: tile.layer.layerDef,
enablePopups: false enablePopups: false,
doShowLayer: tile.layer.isDisplayed
} }
) )
}) })