forked from MapComplete/MapComplete
Improve flyer, fix addPage
This commit is contained in:
parent
ba0046120f
commit
e81e894a11
6 changed files with 72 additions and 53 deletions
20
test.ts
20
test.ts
|
@ -1,16 +1,13 @@
|
|||
import MinimapImplementation from "./UI/Base/MinimapImplementation";
|
||||
|
||||
MinimapImplementation.initialize()
|
||||
|
||||
import {Utils} from "./Utils";
|
||||
import {SvgToPdf, SvgToPdfOptions} from "./Utils/svgToPdf";
|
||||
import {AllKnownLayouts} from "./Customizations/AllKnownLayouts";
|
||||
import Locale from "./UI/i18n/Locale";
|
||||
import LayerConfig from "./Models/ThemeConfig/LayerConfig";
|
||||
import Constants from "./Models/Constants";
|
||||
import {And} from "./Logic/Tags/And";
|
||||
import {Tag} from "./Logic/Tags/Tag";
|
||||
import {Overpass} from "./Logic/Osm/Overpass";
|
||||
import Constants from "./Models/Constants";
|
||||
|
||||
MinimapImplementation.initialize()
|
||||
|
||||
let i = 0
|
||||
|
||||
|
@ -25,10 +22,11 @@ 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")])
|
||||
const chargingStationLayer: LayerConfig = AllKnownLayouts.allKnownLayouts.get("toerisme_vlaanderen").layers.find(l => l.id === "charging_station")
|
||||
chargingStationLayer.filters = []
|
||||
const bikechargingStationLayer : LayerConfig = AllKnownLayouts.allKnownLayouts.get("toerisme_vlaanderen").layers.find(l => l.id === "charging_station_ebikes")
|
||||
|
||||
bikechargingStationLayer.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
|
||||
}
|
||||
|
||||
|
@ -41,7 +39,7 @@ async function main() {
|
|||
textSubstitutions: {
|
||||
mapCount: "" + Array.from(AllKnownLayouts.allKnownLayouts.values()).filter(th => !th.hideFromOverview).length
|
||||
},
|
||||
disableMaps: true
|
||||
disableMaps: false
|
||||
}
|
||||
const front = await new SvgToPdf([svg, svgBack], options)
|
||||
await front.ConvertSvg("Flyer-nl.pdf", "nl")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue