From 4c0c3fb7a359153c7bdd4a957af8f2e794b7b631 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 15 Apr 2025 12:24:35 +0200 Subject: [PATCH] Chore: lint themes --- assets/layers/all_streets/all_streets.json | 14 +- .../charging_station/charging_station.json | 272 +++++++++--------- assets/layers/crossings/crossings.json | 2 +- .../layers/drinking_water/drinking_water.json | 8 + .../layers/geocoded_image/geocoded_image.json | 2 +- assets/layers/hydrant/hydrant.json | 2 +- assets/layers/kerbs/kerbs.json | 2 +- .../maproulette_challenge.json | 2 +- assets/layers/recycling/recycling.json | 2 +- assets/layers/street_lamps/street_lamps.json | 2 +- assets/layers/utility_pole/utility_pole.json | 62 ++-- assets/themes/grb/grb.json | 88 +++--- .../mapcomplete-changes.json | 21 +- .../themes/winter_service/winter_service.json | 14 +- 14 files changed, 250 insertions(+), 243 deletions(-) diff --git a/assets/layers/all_streets/all_streets.json b/assets/layers/all_streets/all_streets.json index 9d1d18443..c0da85563 100644 --- a/assets/layers/all_streets/all_streets.json +++ b/assets/layers/all_streets/all_streets.json @@ -1,6 +1,5 @@ { "id": "all_streets", - "isCounted": false, "name": { "en": "All streets", "nl": "Alle straten", @@ -32,6 +31,7 @@ ] } }, + "isCounted": false, "minzoom": 18, "title": { "render": { @@ -60,10 +60,6 @@ } ] }, - "tagRenderings": [ - "images" - ], - "allowSplit": true, "pointRendering": null, "lineRendering": [ { @@ -82,5 +78,9 @@ } } ], - "allowMove": false -} \ No newline at end of file + "tagRenderings": [ + "images" + ], + "allowMove": false, + "allowSplit": true +} diff --git a/assets/layers/charging_station/charging_station.json b/assets/layers/charging_station/charging_station.json index 8ca5b88c9..20ecbbbae 100644 --- a/assets/layers/charging_station/charging_station.json +++ b/assets/layers/charging_station/charging_station.json @@ -9,7 +9,15 @@ "es": "Puntos de carga", "uk": "Зарядні станції" }, - "minzoom": 10, + "description": { + "en": "A charging station", + "nl": "Oplaadpunten", + "ca": "Una estació de càrrega", + "cs": "Nabíjecí stanice", + "de": "Eine Ladestation", + "es": "Un punto de carga", + "fr": "Une station de recharge" + }, "source": { "osmTags": { "and": [ @@ -24,6 +32,7 @@ ] } }, + "minzoom": 10, "title": { "render": { "en": "Charging station", @@ -81,16 +90,117 @@ } ] }, - "description": { - "en": "A charging station", - "nl": "Oplaadpunten", - "ca": "Una estació de càrrega", - "cs": "Nabíjecí stanice", - "de": "Eine Ladestation", - "es": "Un punto de carga", - "fr": "Une station de recharge" - }, - "#": "no-question-hint-check", + "pointRendering": [ + { + "location": [ + "point", + "centroid" + ], + "marker": [ + { + "icon": "pin", + "color": "#fff" + }, + { + "icon": { + "render": "./assets/themes/charging_stations/plug.svg", + "mappings": [ + { + "if": "bicycle=yes", + "then": "./assets/themes/charging_stations/bicycle.svg" + }, + { + "if": { + "or": [ + "car=yes", + "motorcar=yes" + ] + }, + "then": "./assets/themes/charging_stations/car.svg" + } + ] + } + } + ], + "iconBadges": [ + { + "if": { + "or": [ + "disused:amenity=charging_station", + "operational_status=broken" + ] + }, + "then": "close:#c22;" + }, + { + "if": { + "or": [ + "proposed:amenity=charging_station", + "planned:amenity=charging_station" + ] + }, + "then": "./assets/layers/charging_station/under_construction.svg" + }, + { + "if": { + "and": [ + "bicycle=yes", + { + "or": [ + "motorcar=yes", + "car=yes" + ] + } + ] + }, + "then": "circle:#fff;./assets/themes/charging_stations/car.svg" + } + ], + "anchor": "bottom", + "iconSize": "50,50" + } + ], + "lineRendering": [ + { + "color": "black", + "width": 2, + "fillColor": "#80808080" + } + ], + "presets": [ + { + "tags": [ + "amenity=charging_station", + "motorcar=no", + "bicycle=yes" + ], + "title": { + "en": "charging station for electrical bikes", + "nl": "oplaadpunt voor elektrische fietsen", + "ca": "Estació de càrrega de bicicletes elèctriques", + "cs": "nabíjecí stanice pro elektrokola", + "de": "Ladestation für Elektrofahrräder", + "es": "punto de carga para bicicletas eléctricas", + "uk": "зарядна станція для електровелосипедів" + } + }, + { + "tags": [ + "amenity=charging_station", + "motorcar=yes", + "bicycle=no" + ], + "title": { + "en": "charging station for cars", + "nl": "oplaadstation voor elektrische auto's", + "ca": "estació de càrrega per a cotxes", + "cs": "nabíjecí stanice pro auta", + "de": "Ladestation für Autos", + "es": "punto de carga para coches", + "uk": "зарядна станція для автомобілів" + } + } + ], "tagRenderings": [ "images", { @@ -3255,117 +3365,6 @@ } } ], - "lineRendering": [ - { - "color": "black", - "width": 2, - "fillColor": "#80808080" - } - ], - "pointRendering": [ - { - "location": [ - "point", - "centroid" - ], - "marker": [ - { - "icon": "pin", - "color": "#fff" - }, - { - "icon": { - "render": "./assets/themes/charging_stations/plug.svg", - "mappings": [ - { - "if": "bicycle=yes", - "then": "./assets/themes/charging_stations/bicycle.svg" - }, - { - "if": { - "or": [ - "car=yes", - "motorcar=yes" - ] - }, - "then": "./assets/themes/charging_stations/car.svg" - } - ] - } - } - ], - "iconBadges": [ - { - "if": { - "or": [ - "disused:amenity=charging_station", - "operational_status=broken" - ] - }, - "then": "close:#c22;" - }, - { - "if": { - "or": [ - "proposed:amenity=charging_station", - "planned:amenity=charging_station" - ] - }, - "then": "./assets/layers/charging_station/under_construction.svg" - }, - { - "if": { - "and": [ - "bicycle=yes", - { - "or": [ - "motorcar=yes", - "car=yes" - ] - } - ] - }, - "then": "circle:#fff;./assets/themes/charging_stations/car.svg" - } - ], - "anchor": "bottom", - "iconSize": "50,50" - } - ], - "presets": [ - { - "tags": [ - "amenity=charging_station", - "motorcar=no", - "bicycle=yes" - ], - "title": { - "en": "charging station for electrical bikes", - "nl": "oplaadpunt voor elektrische fietsen", - "ca": "Estació de càrrega de bicicletes elèctriques", - "cs": "nabíjecí stanice pro elektrokola", - "de": "Ladestation für Elektrofahrräder", - "es": "punto de carga para bicicletas eléctricas", - "uk": "зарядна станція для електровелосипедів" - } - }, - { - "tags": [ - "amenity=charging_station", - "motorcar=yes", - "bicycle=no" - ], - "title": { - "en": "charging station for cars", - "nl": "oplaadstation voor elektrische auto's", - "ca": "estació de càrrega per a cotxes", - "cs": "nabíjecí stanice pro auta", - "de": "Ladestation für Autos", - "es": "punto de carga para coches", - "uk": "зарядна станція для автомобілів" - } - } - ], "filter": [ { "id": "vehicle-type", @@ -3688,6 +3687,19 @@ ] } ], + "deletion": { + "softDeletionTags": { + "and": [ + "amenity=", + "disused:amenity=charging_station" + ] + }, + "neededChangesets": 10 + }, + "allowMove": { + "enableRelocation": false, + "enableImproveAccuracy": true + }, "units": [ { "maxstay": { @@ -3882,17 +3894,5 @@ } } ], - "allowMove": { - "enableRelocation": false, - "enableImproveAccuracy": true - }, - "deletion": { - "softDeletionTags": { - "and": [ - "amenity=", - "disused:amenity=charging_station" - ] - }, - "neededChangesets": 10 - } -} \ No newline at end of file + "#": "no-question-hint-check" +} diff --git a/assets/layers/crossings/crossings.json b/assets/layers/crossings/crossings.json index 77c56e9dd..33a0a0005 100644 --- a/assets/layers/crossings/crossings.json +++ b/assets/layers/crossings/crossings.json @@ -933,4 +933,4 @@ "enableImproveAccuracy": true, "enableRelocation": false } -} \ No newline at end of file +} diff --git a/assets/layers/drinking_water/drinking_water.json b/assets/layers/drinking_water/drinking_water.json index 2d8515454..46ebbb30c 100644 --- a/assets/layers/drinking_water/drinking_water.json +++ b/assets/layers/drinking_water/drinking_water.json @@ -337,6 +337,14 @@ "uk": "Це водопровідний кран. Вода тече вниз, а керує потоком вентиль або кнопка.", "es": "Esta es una toma de agua. El agua fluye hacia abajo y el chorro está controlado por una válvula o un botón." } + }, + { + "if": "natural=spring", + "ifnot": "natural=", + "then": { + "en": "This is a natural spring", + "nl": "Dit is een bronnetje" + } } ] }, diff --git a/assets/layers/geocoded_image/geocoded_image.json b/assets/layers/geocoded_image/geocoded_image.json index e6d24f9f8..84b9d80a4 100644 --- a/assets/layers/geocoded_image/geocoded_image.json +++ b/assets/layers/geocoded_image/geocoded_image.json @@ -1,10 +1,10 @@ { "id": "geocoded_image", "name": null, - "source": "special", "description": { "*": "Layer showing green dots where a geocoded image was found. See NearbyImages.svelte. Propreties: 'rotation':number,'spherical':'yes'|'no'" }, + "source": "special", "pointRendering": [ { "location": [ diff --git a/assets/layers/hydrant/hydrant.json b/assets/layers/hydrant/hydrant.json index 9532f217d..6de682f90 100644 --- a/assets/layers/hydrant/hydrant.json +++ b/assets/layers/hydrant/hydrant.json @@ -613,4 +613,4 @@ } } ] -} \ No newline at end of file +} diff --git a/assets/layers/kerbs/kerbs.json b/assets/layers/kerbs/kerbs.json index 3c0f1b717..d7057d4ff 100644 --- a/assets/layers/kerbs/kerbs.json +++ b/assets/layers/kerbs/kerbs.json @@ -528,4 +528,4 @@ "es": "un bordillo", "ca": "un kerb" } -} \ No newline at end of file +} diff --git a/assets/layers/maproulette_challenge/maproulette_challenge.json b/assets/layers/maproulette_challenge/maproulette_challenge.json index 2137f4d13..14a4d278e 100644 --- a/assets/layers/maproulette_challenge/maproulette_challenge.json +++ b/assets/layers/maproulette_challenge/maproulette_challenge.json @@ -309,4 +309,4 @@ } ], "allowMove": false -} \ No newline at end of file +} diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index eef666fc4..06fc1512e 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -1866,4 +1866,4 @@ "enableRelocation": true, "enableImproveAccuracy": true } -} \ No newline at end of file +} diff --git a/assets/layers/street_lamps/street_lamps.json b/assets/layers/street_lamps/street_lamps.json index 0f618e813..bbf356368 100644 --- a/assets/layers/street_lamps/street_lamps.json +++ b/assets/layers/street_lamps/street_lamps.json @@ -621,4 +621,4 @@ "enableImproveAccuracy": true, "enableRelocation": false } -} \ No newline at end of file +} diff --git a/assets/layers/utility_pole/utility_pole.json b/assets/layers/utility_pole/utility_pole.json index cfda46bab..4736174d3 100644 --- a/assets/layers/utility_pole/utility_pole.json +++ b/assets/layers/utility_pole/utility_pole.json @@ -3,15 +3,39 @@ "name": { "en": "Utility Poles" }, - "source": { - "osmTags": "man_made=utility_pole" - }, - "title": { - "en": "Utility Pole" - }, "description": { "en": "Layer showing various types of utility poles." }, + "source": { + "osmTags": "man_made=utility_pole" + }, + "minzoom": 18, + "title": { + "en": "Utility Pole" + }, + "pointRendering": [ + { + "marker": [ + { + "icon": "./assets/layers/utility_pole/utility_pole.svg" + } + ], + "location": [ + "point", + "centroid" + ] + } + ], + "presets": [ + { + "tags": [ + "man_made=utility_pole" + ], + "title": { + "en": "a utility pole" + } + } + ], "tagRenderings": [ { "id": "street_lamp", @@ -34,32 +58,8 @@ ] } ], - "presets": [ - { - "tags": [ - "man_made=utility_pole" - ], - "title": { - "en": "a utility pole" - } - } - ], - "pointRendering": [ - { - "marker": [ - { - "icon": "./assets/layers/utility_pole/utility_pole.svg" - } - ], - "location": [ - "point", - "centroid" - ] - } - ], - "minzoom": 18, "allowMove": { "enableImproveAccuracy": true, "enableRelocation": false } -} \ No newline at end of file +} diff --git a/assets/themes/grb/grb.json b/assets/themes/grb/grb.json index 5508a22ed..bc45a5be2 100644 --- a/assets/themes/grb/grb.json +++ b/assets/themes/grb/grb.json @@ -19,50 +19,6 @@ "shortDescription": { "nl": "Grb import helper tool" }, - "popup": [ - { - "id": "wikilink-needed", - "condition": "_description!~.*https://wiki.openstreetmap.org/wiki/WikiProject_Belgium/Building_and_address_import.*", - "dismissable": false, - "title": { - "render": { - "en": "Profile mention obligated", - "nl": "Link op profiel verplicht" - } - }, - "body": [ - { - "render": { - "special": { - "type": "link", - "href": "https://www.openstreetmap.org/profile/edit", - "text": { - "en": "Edit your user profile", - "nl": "Pas je profiel aan" - } - }, - "after": { - "en": "to include the link https://wiki.openstreetmap.org/wiki/WikiProject_Belgium/Building_and_address_import", - "nl": " en voeg deze link toe: https://wiki.openstreetmap.org/wiki/WikiProject_Belgium/Building_and_address_import" - } - } - }, - { - "id": "reload_profile", - "render": { - "special": { - "type": "login_button", - "force": "yes", - "message": { - "en": "Reload your profile", - "nl": "Herlaad je profiel" - } - } - } - } - ] - } - ], "icon": "./assets/themes/grb/logo.svg", "startZoom": 9, "startLat": 51.0249, @@ -844,5 +800,49 @@ "overpassMaxZoom": 15, "osmApiTileSize": 17, "enableCache": false, + "popup": [ + { + "id": "wikilink-needed", + "condition": "_description!~.*https://wiki.openstreetmap.org/wiki/WikiProject_Belgium/Building_and_address_import.*", + "dismissable": false, + "title": { + "render": { + "en": "Profile mention obligated", + "nl": "Link op profiel verplicht" + } + }, + "body": [ + { + "render": { + "special": { + "type": "link", + "href": "https://www.openstreetmap.org/profile/edit", + "text": { + "en": "Edit your user profile", + "nl": "Pas je profiel aan" + } + }, + "after": { + "en": "to include the link https://wiki.openstreetmap.org/wiki/WikiProject_Belgium/Building_and_address_import", + "nl": " en voeg deze link toe: https://wiki.openstreetmap.org/wiki/WikiProject_Belgium/Building_and_address_import" + } + } + }, + { + "id": "reload_profile", + "render": { + "special": { + "type": "login_button", + "force": "yes", + "message": { + "en": "Reload your profile", + "nl": "Herlaad je profiel" + } + } + } + } + ] + } + ], "widenFactor": 2 } diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.json index 5b843b26b..eceb26fbd 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -9,15 +9,6 @@ "nl": "Wijzigingen gemaakt met MapComplete", "ko": "MapComplete로 이루어진 변경 사항" }, - "shortDescription": { - "en": "Shows changes made by MapComplete", - "de": "Zeigt die von MapComplete vorgenommenen Änderungen an", - "cs": "Zobrazuje změny provedené nástrojem MapComplete", - "es": "Muestra los cambios realizados por MapComplete", - "fr": "Afficher les modifications faites avec MapComplete", - "nl": "Toont wijzigingen gemaakt met MapComplete", - "ko": "MapComplete를 통해 이루어진 변경 사항을 표시합니다" - }, "description": { "en": "This maps shows all the changes made with MapComplete", "de": "Diese Karte zeigt alle mit MapComplete vorgenommenen Änderungen", @@ -28,11 +19,17 @@ "nl": "Deze kaarten tonen alle wijzigingen die zijn gemaakt met MapComplete", "ko": "이 지도는 MapComplete를 사용하여 이루어진 모든 변경 사항을 표시합니다" }, + "shortDescription": { + "en": "Shows changes made by MapComplete", + "de": "Zeigt die von MapComplete vorgenommenen Änderungen an", + "cs": "Zobrazuje změny provedené nástrojem MapComplete", + "es": "Muestra los cambios realizados por MapComplete", + "fr": "Afficher les modifications faites avec MapComplete", + "nl": "Toont wijzigingen gemaakt met MapComplete", + "ko": "MapComplete를 통해 이루어진 변경 사항을 표시합니다" + }, "icon": "./assets/svg/logo.svg", "hideFromOverview": true, - "startLat": 0, - "startLon": 0, - "startZoom": 1, "layers": [ { "id": "mapcomplete-changes", diff --git a/assets/themes/winter_service/winter_service.json b/assets/themes/winter_service/winter_service.json index 52dc08a6f..44e9dfe30 100644 --- a/assets/themes/winter_service/winter_service.json +++ b/assets/themes/winter_service/winter_service.json @@ -1,11 +1,16 @@ { - "credits": "Robin van der Linde", - "credits:uid": 5093765, "id": "winter_service", "title": { "en": "Winter Service" }, + "description": { + "en": "A map showing roads and whether they're cleared in winter" + }, "icon": "./assets/svg/snowflake.svg", + "credits": [ + "Robin van der Linde" + ], + "hideFromOverview": true, "layers": [ { "id": "serviced_streets", @@ -92,9 +97,6 @@ } } ], - "description": { - "en": "A map showing roads and whether they're cleared in winter" - }, "overrideAll": { "tagRenderings+": [ { @@ -128,5 +130,5 @@ } ] }, - "hideFromOverview": true + "credits:uid": 5093765 } \ No newline at end of file