Merge branch 'master' into develop

This commit is contained in:
Pieter Vander Vennet 2021-11-08 00:46:07 +01:00
commit 78c689b7e8
87 changed files with 14161 additions and 1351 deletions

View file

@ -47,6 +47,11 @@ class LayerOverviewUtils {
if (layerJson["overpassTags"] !== undefined) {
errorCount.push("Layer " + layerJson.id + "still uses the old 'overpassTags'-format. Please use \"source\": {\"osmTags\": <tags>}' instead of \"overpassTags\": <tags> (note: this isn't your fault, the custom theme generator still spits out the old format)")
}
const forbiddenTopLevel = ["icon","wayHandling","roamingRenderings","roamingRendering","label","width","color","colour","iconOverlays"]
for (const forbiddenKey of forbiddenTopLevel) {
if(layerJson[forbiddenKey] !== undefined)
errorCount.push("Layer "+layerJson.id+" still has a forbidden key "+forbiddenKey)
}
try {
const layer = new LayerConfig(layerJson, "test", true)
const images = Array.from(layer.ExtractImages())

View file

@ -10,7 +10,7 @@ import LegacyJsonConvert from "../Models/ThemeConfig/LegacyJsonConvert";
const layerFiles = ScriptUtils.getLayerFiles();
for (const layerFile of layerFiles) {
LegacyJsonConvert.fixLayerConfig(layerFile.parsed)
writeFileSync(layerFile.path, JSON.stringify(layerFile.parsed, null, " "))
writeFileSync(layerFile.path, JSON.stringify(layerFile.parsed, null, " "))
}
const themeFiles = ScriptUtils.getThemeFiles()