From a571d857d66402835e793b9c77177680e2b7782a Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 12 Jan 2024 23:43:25 +0100 Subject: [PATCH] Chore: lint themes --- assets/layers/bank/bank.json | 66 ++--- .../charging_station/charging_station.json | 238 +++++++++--------- .../layers/drinking_water/drinking_water.json | 2 +- assets/layers/unit/unit.json | 6 +- assets/themes/grb/grb.json | 1 - .../mapcomplete-changes.json | 15 +- 6 files changed, 162 insertions(+), 166 deletions(-) diff --git a/assets/layers/bank/bank.json b/assets/layers/bank/bank.json index f874b37113..8369bb6871 100644 --- a/assets/layers/bank/bank.json +++ b/assets/layers/bank/bank.json @@ -1,17 +1,5 @@ { "id": "bank", - "description": { - "en": "A financial institution to deposit money", - "de": "Ein Finanzinstitut, um Geld einzuzahlen", - "nl": "Een financiële instelling waar je geld kunt", - "ca": "Una institució financera per a dipositar diners", - "cs": "Finanční instituce pro ukládání peněz", - "he": "מוסד פיננסי להפקדת כסף", - "pl": "Instytucja finansowa pozwalająca wpłacić pieniądze", - "pt_BR": "Um instituição financeira para depositar dinheiro", - "es": "Una institución financiera para depositar dinero", - "pt": "Uma instituição financeira para depositar dinheiro" - }, "name": { "en": "Banks", "de": "Banken", @@ -26,6 +14,21 @@ "es": "Bancos", "pt": "Bancos" }, + "description": { + "en": "A financial institution to deposit money", + "de": "Ein Finanzinstitut, um Geld einzuzahlen", + "nl": "Een financiële instelling waar je geld kunt", + "ca": "Una institució financera per a dipositar diners", + "cs": "Finanční instituce pro ukládání peněz", + "he": "מוסד פיננסי להפקדת כסף", + "pl": "Instytucja finansowa pozwalająca wpłacić pieniądze", + "pt_BR": "Um instituição financeira para depositar dinheiro", + "es": "Una institución financiera para depositar dinero", + "pt": "Uma instituição financeira para depositar dinheiro" + }, + "source": { + "osmTags": "amenity=bank" + }, "title": { "render": "Bank", "mappings": [ @@ -35,9 +38,24 @@ } ] }, - "source": { - "osmTags": "amenity=bank" - }, + "pointRendering": [ + { + "marker": [ + { + "icon": "circle", + "color": "white" + }, + { + "icon": "./assets/layers/bank/bank.svg" + } + ], + "location": [ + "point", + "centroid" + ] + } + ], + "lineRendering": [], "tagRenderings": [ "images", { @@ -127,24 +145,6 @@ ] } ], - "pointRendering": [ - { - "marker": [ - { - "icon": "circle", - "color": "white" - }, - { - "icon": "./assets/layers/bank/bank.svg" - } - ], - "location": [ - "point", - "centroid" - ] - } - ], - "lineRendering": [], "deletion": { "softDeletionTags": "amenity=" } diff --git a/assets/layers/charging_station/charging_station.json b/assets/layers/charging_station/charging_station.json index 80ede2ffc5..f92d55dcb4 100644 --- a/assets/layers/charging_station/charging_station.json +++ b/assets/layers/charging_station/charging_station.json @@ -5,7 +5,11 @@ "nl": "Oplaadpunten", "de": "Ladestationen" }, - "minzoom": 10, + "description": { + "en": "A charging station", + "nl": "Oplaadpunten", + "de": "Eine Ladestation" + }, "source": { "osmTags": { "and": [ @@ -20,6 +24,7 @@ ] } }, + "minzoom": 10, "title": { "render": { "en": "Charging station", @@ -65,12 +70,103 @@ } ] }, - "description": { - "en": "A charging station", - "nl": "Oplaadpunten", - "de": "Eine Ladestation" - }, - "#": "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": [], + "presets": [ + { + "tags": [ + "amenity=charging_station", + "motorcar=no", + "bicycle=yes" + ], + "title": { + "en": "charging station for electrical bikes", + "nl": "oplaadpunt voor elektrische fietsen", + "de": "Ladestation für Elektrofahrräder" + } + }, + { + "tags": [ + "amenity=charging_station", + "motorcar=yes", + "bicycle=no" + ], + "title": { + "en": "charging station for cars", + "nl": "oplaadstation voor elektrische auto's", + "de": "Ladestation für Elektrofahrräder" + } + } + ], "tagRenderings": [ "images", { @@ -2227,103 +2323,6 @@ } } ], - "lineRendering": [], - "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", - "de": "Ladestation für Elektrofahrräder" - } - }, - { - "tags": [ - "amenity=charging_station", - "motorcar=yes", - "bicycle=no" - ], - "title": { - "en": "charging station for cars", - "nl": "oplaadstation voor elektrische auto's", - "de": "Ladestation für Elektrofahrräder" - } - } - ], "filter": [ { "id": "vehicle-type", @@ -2517,6 +2516,20 @@ ] } ], + "deletion": { + "softDeletionTags": { + "and": [ + "amenity=", + "disused:amenity=charging_station" + ] + }, + "neededChangesets": 10 + }, + "allowMove": { + "enableRelocation": false, + "enableImproveAccuracy": true + }, + "#": "no-question-hint-check", "units": [ { "maxstay": { @@ -2665,18 +2678,5 @@ ] } } - ], - "allowMove": { - "enableRelocation": false, - "enableImproveAccuracy": true - }, - "deletion": { - "softDeletionTags": { - "and": [ - "amenity=", - "disused:amenity=charging_station" - ] - }, - "neededChangesets": 10 - } -} \ 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 37926fc172..74dac079f5 100644 --- a/assets/layers/drinking_water/drinking_water.json +++ b/assets/layers/drinking_water/drinking_water.json @@ -40,12 +40,12 @@ ] } }, - "minzoom": 12, "calculatedTags": [ "_closest_other_drinking_water=closestn(feat)('drinking_water', 1, undefined, 5000).map(f => ({id: f.feat.id, distance: ''+f.distance}))[0]", "_closest_other_drinking_water_id=get(feat)('_closest_other_drinking_water')?.id", "_closest_other_drinking_water_distance=Math.floor(Number(get(feat)('_closest_other_drinking_water')?.distance))" ], + "minzoom": 12, "title": { "render": { "en": "Drinking water", diff --git a/assets/layers/unit/unit.json b/assets/layers/unit/unit.json index 5c23af3a09..07f9c71ad1 100644 --- a/assets/layers/unit/unit.json +++ b/assets/layers/unit/unit.json @@ -4,6 +4,8 @@ "en": "Library layer with all common units. Units can _only_ be imported from this file." }, "source": "special:library", + "pointRendering": null, + "lineRendering": null, "units": [ { "quantity": "power", @@ -378,7 +380,5 @@ } ] } - ], - "pointRendering": null, - "lineRendering": null + ] } diff --git a/assets/themes/grb/grb.json b/assets/themes/grb/grb.json index 591ebc3b39..c4c9556601 100644 --- a/assets/themes/grb/grb.json +++ b/assets/themes/grb/grb.json @@ -22,7 +22,6 @@ "startZoom": 9, "startLat": 51.0249, "startLon": 4.026489, - "defaultBackgroundId": "osm", "credits": [ "Pieter Vander Vennet" diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.json index 6c73765960..2dd587e79b 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -3,19 +3,14 @@ "title": { "en": "Changes made with MapComplete" }, - "shortDescription": { - "en": "Shows changes made by MapComplete" - }, "description": { "en": "This maps shows all the changes made with MapComplete" }, + "shortDescription": { + "en": "Shows changes made by MapComplete" + }, "icon": "./assets/svg/logo.svg", "hideFromOverview": true, - "startLat": 0, - "startLon": 0, - "startZoom": 1, - "widenFactor": 0.05, - "clustering": false, "layers": [ { "id": "mapcomplete-changes", @@ -655,5 +650,7 @@ ] } } - ] + ], + "widenFactor": 0.05, + "clustering": false } \ No newline at end of file