Fix overlays in PDF, add overlay URL parameters

This commit is contained in:
Pieter Vander Vennet 2021-10-15 00:52:31 +02:00
parent 891c449058
commit 4e43673de5
9 changed files with 32 additions and 9 deletions

View file

@ -14,6 +14,7 @@ import LayoutConfig from "../Models/ThemeConfig/LayoutConfig";
import FeaturePipeline from "../Logic/FeatureSource/FeaturePipeline";
import ShowDataLayer from "./ShowDataLayer/ShowDataLayer";
import {BBox} from "../Logic/BBox";
import ShowOverlayLayer from "./ShowDataLayer/ShowOverlayLayer";
/**
* Creates screenshoter to take png screenshot
* Creates jspdf and downloads it
@ -103,6 +104,19 @@ export default class ExportPDF {
})
const initialized =new Set()
for (const overlayToggle of State.state.overlayToggles) {
new ShowOverlayLayer(overlayToggle.config, minimap.leafletMap, overlayToggle.isDisplayed)
initialized.add(overlayToggle.config)
}
for (const tileLayerSource of State.state.layoutToUse.tileLayerSources) {
if (initialized.has(tileLayerSource)) {
continue
}
new ShowOverlayLayer(tileLayerSource, minimap.leafletMap)
}
}
private cleanup() {

View file

@ -133,7 +133,7 @@ export default class FeatureInfoBox extends ScrollableFullScreen {
State.state.featureSwitchIsDebugging.map(isDebugging => {
if (isDebugging) {
const config: TagRenderingConfig = new TagRenderingConfig({render: "{all_tags()}"}, new Tag("id", ""), "");
return new TagRenderingAnswer(tags, config)
return new TagRenderingAnswer(tags, config, "all_tags")
}
})
)