forked from MapComplete/MapComplete
More tweaks
This commit is contained in:
parent
739275f8a1
commit
de4e394088
5 changed files with 69 additions and 94 deletions
|
@ -71,6 +71,9 @@ export class PngMapCreator {
|
|||
} else {
|
||||
const bounds = BBox.fromLeafletBounds(leaflet.getBounds().pad(0.1).pad(-state.layoutToUse.widenFactor))
|
||||
state.currentBounds.setData(bounds)
|
||||
if(!state.featurePipeline.sufficientlyZoomed.data){
|
||||
console.warn("Not sufficiently zoomed!")
|
||||
}
|
||||
|
||||
if (state.featurePipeline.runningQuery.data) {
|
||||
// A query is running!
|
||||
|
@ -81,10 +84,6 @@ export class PngMapCreator {
|
|||
}
|
||||
|
||||
state.featurePipeline.GetTilesPerLayerWithin(bounds, (tile) => {
|
||||
|
||||
if (tile.layer.layerDef.minzoom > state.locationControl.data.zoom) {
|
||||
return
|
||||
}
|
||||
if (tile.layer.layerDef.id.startsWith("note_import")) {
|
||||
// Don't export notes to import
|
||||
return
|
||||
|
|
|
@ -591,6 +591,7 @@ export class SvgToPdf {
|
|||
if (key === "force") {
|
||||
console.log("Forcing minzoom of layer",layer.id)
|
||||
layer.minzoom = 0
|
||||
layer.minzoomVisible = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -618,11 +619,13 @@ export class SvgToPdf {
|
|||
const key = params[paramsKey].toLowerCase().trim()
|
||||
const isDisplayed = key === "true" || key === "force";
|
||||
const layer = state.filteredLayers.data.find(l => l.layerDef.id === layerName)
|
||||
console.log("Setting ", layer?.layerDef?.id," to visibility", isDisplayed, "(minzoom:", layer?.layerDef?.minzoomVisible, layer?.layerDef?.minzoom,")")
|
||||
layer.isDisplayed.setData(
|
||||
isDisplayed
|
||||
)
|
||||
if (key === "force") {
|
||||
layer.layerDef.minzoom = 0
|
||||
layer.layerDef.minzoomVisible = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue