Studio: some more tweaks

This commit is contained in:
Pieter Vander Vennet 2023-10-30 14:32:31 +01:00
parent 69a7c9efa3
commit d749b5c68f
8 changed files with 577 additions and 19 deletions

View file

@ -144,6 +144,14 @@ class LayerOverviewUtils extends Script {
includeInlineLayers = true
): string[] {
const publicLayerIds = []
if (!Array.isArray(themeFile.layers)) {
throw (
"Cannot iterate over 'layers' of " +
themeFile.id +
"; it is a " +
typeof themeFile.layers
)
}
for (const publicLayer of themeFile.layers) {
if (typeof publicLayer === "string") {
publicLayerIds.push(publicLayer)

View file

@ -64,6 +64,12 @@ export class GenerateLicenseInfo extends Script {
license: "CC0",
sources: [],
})
knownLicenses.set("carto", {
authors: ["OSM-Carto"],
path: undefined,
license: "CC0",
sources: [""],
})
knownLicenses.set("tv", {
authors: ["Toerisme Vlaanderen"],
path: undefined,
@ -172,10 +178,6 @@ export class GenerateLicenseInfo extends Script {
if (author == "Q" || author == "q" || author == "") {
throw "Quitting now!"
}
let authors = author.split(";")
if (author.toLowerCase() == "none") {
authors = []
}
return {
authors: author.split(";"),
path: path,