diff --git a/Utils/pngMapCreator.ts b/Utils/pngMapCreator.ts index 6e0f9400a..59957afcd 100644 --- a/Utils/pngMapCreator.ts +++ b/Utils/pngMapCreator.ts @@ -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 diff --git a/Utils/svgToPdf.ts b/Utils/svgToPdf.ts index 744ac7820..8e260e12c 100644 --- a/Utils/svgToPdf.ts +++ b/Utils/svgToPdf.ts @@ -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 } } } diff --git a/assets/templates/MapComplete-flyer.back.svg b/assets/templates/MapComplete-flyer.back.svg index cc5e5fad0..70f046a9a 100644 --- a/assets/templates/MapComplete-flyer.back.svg +++ b/assets/templates/MapComplete-flyer.back.svg @@ -27,7 +27,7 @@ showguides="true" inkscape:guide-bbox="true" inkscape:zoom="1.0169528" - inkscape:cx="730.12238" + inkscape:cx="389.89027" inkscape:cy="403.16522" inkscape:window-width="1920" inkscape:window-height="1007" @@ -423,9 +423,9 @@ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect21432-8);display:inline;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264848;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">$map(theme:aed,z:14,lat:51.2098,lon:3.2284) + id="tspan1850">$map(theme:aed,z:14,lat:51.2098,lon:3.2284) $flyer.toerisme_vlaanderen + id="tspan1854">$flyer.toerisme_vlaanderen $map(theme:toerisme_vlaanderen,layer-$map(theme:toerisme_vlaanderen,layers:nonebench:false,layers:none, layer-,layer-charging_station_ebikes:force,lat:charging_station_ebikes:force,lat:51.02403,lon:5.1, z:10) + id="tspan1866">51.02403,lon:5.1, z:10) $map(theme:cyclofix,z:14,lat:$map(theme:cyclofix,z:14,lat:51.05016,lon:51.05016,lon:3.717842,layers:none,layer-3.717842,layers:none,layer-bike_repair_station:true,layer-bike_repair_station:true,layer-drinking_water:true,layer-bike_cafe:true,layer-drinking_water:true,layer-bike_cafe:true,layer-bicycle_tube_vending_machine: true) + id="tspan1888">bicycle_tube_vending_machine: true) $map(theme:artwork,z:15,lat:51.2098,lon:$map(theme:artwork,z:15,lat:51.2098,lon:3.2284,background:AGIV) + id="tspan1896">3.2284,background:AGIV) $map(theme:cyclestreets,z:12,lat:51.2098,lon:$map(theme:cyclestreets,z:12,lat:51.2098,lon:3.2284) + id="tspan1904">3.2284) @@ -592,14 +585,14 @@ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect890);display:inline;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264848;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">$map(theme:benches,z:14,lat:51.2098,lon:$map(theme:benches,z:14,lat:51.2098,lon:3.2284, layers:none, layer-bench:force) + id="tspan1912">3.2284, layers:none, layer-bench:force) $flyer.aerial + id="tspan1916">$flyer.aerial $flyer.examples + id="tspan1920">$flyer.examples @@ -686,9 +679,9 @@ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect135032);fill:#000000;fill-opacity:1;stroke:none">$flyer.title + id="tspan1924">$flyer.title {id}", - "de": "Änderungssatz {id}" + "en": "Changeset {id}" } }, { "id": "contributor", "question": { - "en": "What contributor did make this change?", - "de": "Welcher Mitwirkende hat diese Änderung vorgenommen?" + "en": "What contributor did make this change?" }, "freeform": { "key": "user" }, "render": { - "en": "Change made by {user}", - "de": "Änderung vorgenommen von {user}" + "en": "Change made by {user}" } }, { "id": "theme-id", "question": { - "en": "What theme was used to make this change?", - "de": "Welches Thema wurde für diese Änderung verwendet?" + "en": "What theme was used to make this change?" }, "freeform": { "key": "theme" }, "render": { - "en": "Change with theme {theme}", - "de": "Geändert mit Thema {theme}" + "en": "Change with theme {theme}" } }, { @@ -86,23 +74,19 @@ "key": "locale" }, "question": { - "en": "What locale (language) was this change made in?", - "de": "In welchem Gebietsschema (Sprache) wurde diese Änderung vorgenommen?" + "en": "What locale (language) was this change made in?" }, "render": { - "en": "User locale is {locale}", - "de": "Benutzergebietsschema ist {locale}" + "en": "User locale is {locale}" } }, { "id": "host", "render": { - "en": "Changed with {host}", - "de": "Geändert über {host}" + "en": "Change with with {host}" }, "question": { - "en": "What host (website) was this change made with?", - "de": "Über welchen Host (Webseite) wurde diese Änderung vorgenommen?" + "en": "What host (website) was this change made with?" }, "freeform": { "key": "host" @@ -423,8 +407,7 @@ } ], "question": { - "en": "Themename contains {search}", - "de": "Themename enthält {search}" + "en": "Themename contains {search}" } } ] @@ -440,8 +423,7 @@ } ], "question": { - "en": "Made by contributor {search}", - "de": "Erstellt vom Mitwirkenden {search}" + "en": "Made by contributor {search}" } } ] @@ -457,8 +439,7 @@ } ], "question": { - "en": "Not made by contributor {search}", - "de": "Nicht von Mitwirkendem {search}" + "en": "Not made by contributor {search}" } } ] @@ -475,8 +456,7 @@ } ], "question": { - "en": "User language (iso-code) {search}", - "de": "Benutzersprache (ISO-Code) {search}" + "en": "Made before {search}" } } ] @@ -493,8 +473,7 @@ } ], "question": { - "en": "Made with host {search}", - "de": "Erstellt mit host {search}" + "en": "Made after {search}" } } ] @@ -541,8 +520,7 @@ { "id": "link_to_more", "render": { - "en": "More statistics can be found here", - "de": "Weitere Statistiken finden Sie unter hier" + "en": "More statistics can be found here" } }, { diff --git a/test.ts b/test.ts index c624eec30..ca6c013ce 100644 --- a/test.ts +++ b/test.ts @@ -26,6 +26,8 @@ async function main() { // Dirty hack! // Make the charging-station layer simpler to allow querying it by overpass const chargingStationLayer: LayerConfig = AllKnownLayouts.allKnownLayouts.get("toerisme_vlaanderen").layers.find(l => l.id === "charging_station_ebikes") + chargingStationLayer.minzoom = 0 + chargingStationLayer.minzoomVisible = 0 // chargingStationLayer.source.osmTags = new And([new Tag("amenity","charging_station"), new Tag("bicycle","yes")]) Constants.defaultOverpassUrls.splice(0,1) // remove overpass-api.de for this run }