diff --git a/assets/layers/bike_parking/bike_parking.json b/assets/layers/bike_parking/bike_parking.json index 6bf33e89b..ee3c76619 100644 --- a/assets/layers/bike_parking/bike_parking.json +++ b/assets/layers/bike_parking/bike_parking.json @@ -683,6 +683,10 @@ "en": "Who maintains this bicycle parking?", "nl": "Wie beheert deze fietsenstalling?" }, + "render": { + "en": "This bicycle parking is maintained by {operator}", + "nl": "Deze fietsenstalling wordt beheerd door {operator}" + }, "freeform": { "key": "operator" } diff --git a/assets/themes/atm/atm.json b/assets/themes/atm/atm.json index 2a625cd04..7d848ac6f 100644 --- a/assets/themes/atm/atm.json +++ b/assets/themes/atm/atm.json @@ -57,7 +57,7 @@ "minzoom": 18, "name": null, "filter": { - "sameAs": "bank_with_atm" + "sameAs": "banks_with_atm" }, "doCount": false } diff --git a/assets/themes/cyclofix/cyclofix.json b/assets/themes/cyclofix/cyclofix.json index e1361596f..279ee784f 100644 --- a/assets/themes/cyclofix/cyclofix.json +++ b/assets/themes/cyclofix/cyclofix.json @@ -151,7 +151,7 @@ "override": { "name": null, "filter": { - "sameAs": "charging_station_ebike" + "sameAs": "charging_station_ebikes" }, "minzoom": 18 } diff --git a/assets/themes/openlovemap/openlovemap.json b/assets/themes/openlovemap/openlovemap.json index b065d55f8..5591b0afc 100644 --- a/assets/themes/openlovemap/openlovemap.json +++ b/assets/themes/openlovemap/openlovemap.json @@ -53,7 +53,7 @@ "=name": null, "doCount": false, "=filter": { - "sameAs": "erotic-shop" + "sameAs": "erotic_shop" } } }, diff --git a/assets/themes/toerisme_vlaanderen/toerisme_vlaanderen.json b/assets/themes/toerisme_vlaanderen/toerisme_vlaanderen.json index 52d99d2cb..1af74e222 100644 --- a/assets/themes/toerisme_vlaanderen/toerisme_vlaanderen.json +++ b/assets/themes/toerisme_vlaanderen/toerisme_vlaanderen.json @@ -83,7 +83,7 @@ "override": { "name": null, "filter": { - "sameAs": "charging_station_ebike" + "sameAs": "charging_station_ebikes" }, "minzoom": 18, "=presets": [] diff --git a/src/Models/ThemeConfig/Conversion/PrepareTheme.ts b/src/Models/ThemeConfig/Conversion/PrepareTheme.ts index cc2c43a41..04d9e9232 100644 --- a/src/Models/ThemeConfig/Conversion/PrepareTheme.ts +++ b/src/Models/ThemeConfig/Conversion/PrepareTheme.ts @@ -600,6 +600,23 @@ class PostvalidateTheme extends DesugaringStep { } } + for (const layer of json.layers) { + if(typeof layer === "string"){ + continue + } + const config = layer; + const sameAs = config.filter?.["sameAs"] + if(!sameAs){ + continue + } + + const matchingLayer = json.layers.find(l => l["id"] === sameAs) + if(!matchingLayer){ + const closeLayers = Utils.sortedByLevenshteinDistance(sameAs, json.layers, l => l["id"]).map(l => l["id"]) + context.enters("layers", config.id, "filter","sameAs").err("The layer "+config.id+" follows the filter state of layer "+sameAs+", but no layer with this name was found.\n\tDid you perhaps mean one of: "+closeLayers.slice(0, 3).join(", ")) + } + } + return json } }