From 6c12041f732bb06fb530389d733e7e8a16701b56 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Sun, 28 Apr 2024 11:00:23 +0200 Subject: [PATCH] Chore: Lint themes --- assets/layers/aerialway/aerialway.json | 2 +- assets/layers/bike_parking/bike_parking.json | 26 +- .../charging_station/charging_station.json | 238 +++++++++--------- assets/layers/food_courts/food_courts.json | 60 ++--- assets/layers/memorial/memorial.json | 36 +-- .../outdoor_seating/outdoor_seating.json | 50 ++-- assets/layers/ski_piste/ski_piste.json | 2 +- assets/layers/speed_camera/speed_camera.json | 10 +- assets/layers/unit/unit.json | 1 - .../walls_and_buildings.json | 2 +- .../bicycle_parkings/bicycle_parkings.json | 8 +- assets/themes/grb/grb.json | 4 +- .../mapcomplete-changes.json | 9 +- assets/themes/memorials/memorials.json | 10 +- assets/themes/personal/personal.json | 2 +- assets/themes/trees/trees.json | 4 +- 16 files changed, 230 insertions(+), 234 deletions(-) diff --git a/assets/layers/aerialway/aerialway.json b/assets/layers/aerialway/aerialway.json index 791cf57787..a8042c4e76 100644 --- a/assets/layers/aerialway/aerialway.json +++ b/assets/layers/aerialway/aerialway.json @@ -8,7 +8,6 @@ "en": "Various forms of transport for passengers and goods that use wires, including cable cars, gondolas, chair lifts, drag lifts, and zip lines. ", "de": "Alle Arten von seil- oder drahtgestütztem Personen- oder Gütertransport, wie Seilbahnen, Gondeln, Sessellifte, Schlepplifte. " }, - "minzoom": 11, "source": { "osmTags": { "and": [ @@ -18,6 +17,7 @@ ] } }, + "minzoom": 11, "title": { "render": { "en": "Aerialway {name}", diff --git a/assets/layers/bike_parking/bike_parking.json b/assets/layers/bike_parking/bike_parking.json index c99ddda8cb..bdc89e1a45 100644 --- a/assets/layers/bike_parking/bike_parking.json +++ b/assets/layers/bike_parking/bike_parking.json @@ -976,18 +976,6 @@ } } ], - "units": [ - { - "maxstay": { - "quantity": "duration", - "denominations": [ - "days", - "weeks", - "months" - ] - } - } - ], "deletion": { "softDeletionTags": { "and": [ @@ -1000,5 +988,17 @@ "allowMove": { "enableRelocation": false, "enableImproveAccuracy": true - } + }, + "units": [ + { + "maxstay": { + "quantity": "duration", + "denominations": [ + "days", + "weeks", + "months" + ] + } + } + ] } diff --git a/assets/layers/charging_station/charging_station.json b/assets/layers/charging_station/charging_station.json index dcfaad56bb..305b2f6bd0 100644 --- a/assets/layers/charging_station/charging_station.json +++ b/assets/layers/charging_station/charging_station.json @@ -5,7 +5,12 @@ "nl": "Oplaadpunten", "de": "Ladestationen" }, - "minzoom": 10, + "description": { + "en": "A charging station", + "nl": "Oplaadpunten", + "ca": "Una estació de càrrega", + "de": "Eine Ladestation" + }, "source": { "osmTags": { "and": [ @@ -20,6 +25,7 @@ ] } }, + "minzoom": 10, "title": { "render": { "en": "Charging station", @@ -65,13 +71,103 @@ } ] }, - "description": { - "en": "A charging station", - "nl": "Oplaadpunten", - "ca": "Una estació de càrrega", - "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 Autos" + } + } + ], "tagRenderings": [ "images", { @@ -2413,103 +2509,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 Autos" - } - } - ], "filter": [ { "id": "vehicle-type", @@ -2715,6 +2714,19 @@ ] } ], + "deletion": { + "softDeletionTags": { + "and": [ + "amenity=", + "disused:amenity=charging_station" + ] + }, + "neededChangesets": 10 + }, + "allowMove": { + "enableRelocation": false, + "enableImproveAccuracy": true + }, "units": [ { "maxstay": { @@ -2873,17 +2885,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/food_courts/food_courts.json b/assets/layers/food_courts/food_courts.json index bfaa854b04..b740d868df 100644 --- a/assets/layers/food_courts/food_courts.json +++ b/assets/layers/food_courts/food_courts.json @@ -6,6 +6,10 @@ "description": { "en": "Food courts with a variety of food options." }, + "source": { + "osmTags": "amenity=food_court" + }, + "minzoom": 12, "title": { "render": { "en": "Food Court" @@ -17,35 +21,6 @@ } ] }, - "source": { - "osmTags": "amenity=food_court" - }, - "minzoom": 12, - "tagRenderings": [ - { - "id": "name", - "question": { - "en": "What is the name of this food court?" - }, - "freeform": { - "key": "name", - "type": "string", - "placeholder": { - "en": "Name of the food court" - } - }, - "render": { - "en": "This food court is called {name}." - } - }, - "reviews", - "images", - "opening_hours", - "wheelchair-access", - "website", - "phone", - "smoking" - ], "pointRendering": [ { "location": [ @@ -72,5 +47,30 @@ "color": "#C77400", "fillColor": "#C774004D" } + ], + "tagRenderings": [ + { + "id": "name", + "question": { + "en": "What is the name of this food court?" + }, + "freeform": { + "key": "name", + "type": "string", + "placeholder": { + "en": "Name of the food court" + } + }, + "render": { + "en": "This food court is called {name}." + } + }, + "reviews", + "images", + "opening_hours", + "wheelchair-access", + "website", + "phone", + "smoking" ] -} \ No newline at end of file +} diff --git a/assets/layers/memorial/memorial.json b/assets/layers/memorial/memorial.json index 3b6df8e4f2..766d72d527 100644 --- a/assets/layers/memorial/memorial.json +++ b/assets/layers/memorial/memorial.json @@ -1,5 +1,9 @@ { "id": "memorial", + "name": { + "en": "Memorials", + "de": "Denkmäler" + }, "description": "Layer showing memorial plaques, based upon a unofficial theme. Can be expanded to have multiple types of memorials later on", "source": { "osmTags": { @@ -9,11 +13,7 @@ ] } }, - "name": { - "en": "Memorials", - "de": "Denkmäler" - }, - "defaultBackgroundId": "protomaps.white", + "minzoom": 9, "title": { "render": { "en": "Memorial plaque", @@ -68,6 +68,17 @@ } ], "lineRendering": [], + "presets": [ + { + "title": { + "en": "a memorial", + "de": "ein Denkmal" + }, + "tags": [ + "historic=memorial" + ] + } + ], "tagRenderings": [ "images", { @@ -316,21 +327,10 @@ } } ], - "presets": [ - { - "title": { - "en": "a memorial", - "de": "ein Denkmal" - }, - "tags": [ - "historic=memorial" - ] - } - ], - "minzoom": 9, "deletion": true, "allowMove": { "enableImproveAccuracy": true, "enableRelocation": false - } + }, + "defaultBackgroundId": "protomaps.white" } diff --git a/assets/layers/outdoor_seating/outdoor_seating.json b/assets/layers/outdoor_seating/outdoor_seating.json index 3bf1caebae..c586b11b4b 100644 --- a/assets/layers/outdoor_seating/outdoor_seating.json +++ b/assets/layers/outdoor_seating/outdoor_seating.json @@ -6,6 +6,10 @@ "description": { "en": "Outdoor seating areas, usually located near cafes and restaurants." }, + "source": { + "osmTags": "leisure=outdoor_seating" + }, + "minzoom": 19, "title": { "render": { "en": "Outdoor Seating area" @@ -17,10 +21,26 @@ } ] }, - "source": { - "osmTags": "leisure=outdoor_seating" - }, - "minzoom": 19, + "pointRendering": [ + { + "location": [ + "point", + "centroid" + ], + "marker": [ + { + "icon": "./assets/layers/outdoor_seating/outdoor_seating.svg" + } + ] + } + ], + "lineRendering": [ + { + "color": "green", + "fillColor": "#00FF004D", + "width": 2 + } + ], "tagRenderings": [ "images", { @@ -150,25 +170,5 @@ ] } } - ], - "pointRendering": [ - { - "location": [ - "point", - "centroid" - ], - "marker": [ - { - "icon": "./assets/layers/outdoor_seating/outdoor_seating.svg" - } - ] - } - ], - "lineRendering": [ - { - "color": "green", - "fillColor": "#00FF004D", - "width": 2 - } ] -} \ No newline at end of file +} diff --git a/assets/layers/ski_piste/ski_piste.json b/assets/layers/ski_piste/ski_piste.json index fb0b66cfc2..6e94a69904 100644 --- a/assets/layers/ski_piste/ski_piste.json +++ b/assets/layers/ski_piste/ski_piste.json @@ -8,7 +8,6 @@ "en": "Ski and snowboard pistes", "de": "Ski- und Snowboardpisten" }, - "minzoom": 11, "source": { "osmTags": { "and": [ @@ -22,6 +21,7 @@ ] } }, + "minzoom": 11, "title": { "render": { "en": "Ski piste {name}", diff --git a/assets/layers/speed_camera/speed_camera.json b/assets/layers/speed_camera/speed_camera.json index bfc2414c4e..557d05dbcc 100644 --- a/assets/layers/speed_camera/speed_camera.json +++ b/assets/layers/speed_camera/speed_camera.json @@ -145,6 +145,10 @@ "id": "camera_direction" } ], + "allowMove": { + "enableImproveAccuracy": true, + "enableRelocation": false + }, "units": [ { "maxspeed": { @@ -155,9 +159,5 @@ ] } } - ], - "allowMove": { - "enableImproveAccuracy": true, - "enableRelocation": false - } + ] } diff --git a/assets/layers/unit/unit.json b/assets/layers/unit/unit.json index 123b72133c..bd26fe9b52 100644 --- a/assets/layers/unit/unit.json +++ b/assets/layers/unit/unit.json @@ -436,7 +436,6 @@ "nl": "{quantity} jaar" } } - ] } ] diff --git a/assets/layers/walls_and_buildings/walls_and_buildings.json b/assets/layers/walls_and_buildings/walls_and_buildings.json index 37da1936d9..8d4cc36251 100644 --- a/assets/layers/walls_and_buildings/walls_and_buildings.json +++ b/assets/layers/walls_and_buildings/walls_and_buildings.json @@ -29,6 +29,7 @@ "_biggest_width_properties= /* Can be a list! */ get(feat)('_entrance_properties').filter(p => p.width === get(feat)('_biggest_width'))", "_biggest_width_id=get(feat)('_biggest_width_properties').id" ], + "isCounted": false, "minzoom": 18, "shownByDefault": false, "title": { @@ -121,7 +122,6 @@ "condition": "_biggest_width_id~*" } ], - "isCounted": false, "units": [ { "width": { diff --git a/assets/themes/bicycle_parkings/bicycle_parkings.json b/assets/themes/bicycle_parkings/bicycle_parkings.json index 35362e187c..c4ed407e87 100644 --- a/assets/themes/bicycle_parkings/bicycle_parkings.json +++ b/assets/themes/bicycle_parkings/bicycle_parkings.json @@ -1,13 +1,13 @@ { "id": "bicycle_parkings", - "description": { - "en": "A map showing all types of bicycle parkings", - "de": "Eine Karte mit allen Arten von Fahrradabstellplätzen" - }, "title": { "en": "Bicycle parkings", "de": "Fahrradabstellplätze" }, + "description": { + "en": "A map showing all types of bicycle parkings", + "de": "Eine Karte mit allen Arten von Fahrradabstellplätzen" + }, "icon": "./assets/themes/bicycle_parkings/logo.svg", "layers": [ { diff --git a/assets/themes/grb/grb.json b/assets/themes/grb/grb.json index 8ed73d20b3..7051a5d858 100644 --- a/assets/themes/grb/grb.json +++ b/assets/themes/grb/grb.json @@ -785,7 +785,7 @@ "minzoom": 17, "doCount": false }, - "widenFactor": 2, "overpassMaxZoom": 15, - "osmApiTileSize": 17 + "osmApiTileSize": 17, + "widenFactor": 2 } diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.json index 9e119e077d..0edb1fae1b 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -3,17 +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, "layers": [ { "id": "mapcomplete-changes", diff --git a/assets/themes/memorials/memorials.json b/assets/themes/memorials/memorials.json index e8a6a92384..713d11feb9 100644 --- a/assets/themes/memorials/memorials.json +++ b/assets/themes/memorials/memorials.json @@ -1,14 +1,14 @@ { "id": "memorials", - "icon": "./assets/layers/memorial/memorial.svg", - "description": { - "en": "Memorials are physical objects permantently placed in the public space to remember a person or event. They can be a wide range of objects, such as statues, plaques, paintings, military objects (such as tanks), ...", - "de": "Denkmäler sind physische Objekte, die dauerhaft im öffentlichen Raum aufgestellt werden, um an eine Person oder ein Ereignis zu erinnern. Dabei kann es sich um eine Vielzahl von Objekten handeln, z. B. Statuen, Tafeln, Gemälde, militärische Objekte (wie Panzer), ..." - }, "title": { "en": "Memorials", "de": "Denkmäler" }, + "description": { + "en": "Memorials are physical objects permantently placed in the public space to remember a person or event. They can be a wide range of objects, such as statues, plaques, paintings, military objects (such as tanks), ...", + "de": "Denkmäler sind physische Objekte, die dauerhaft im öffentlichen Raum aufgestellt werden, um an eine Person oder ein Ereignis zu erinnern. Dabei kann es sich um eine Vielzahl von Objekten handeln, z. B. Statuen, Tafeln, Gemälde, militärische Objekte (wie Panzer), ..." + }, + "icon": "./assets/layers/memorial/memorial.svg", "layers": [ { "builtin": [ diff --git a/assets/themes/personal/personal.json b/assets/themes/personal/personal.json index 8095d3e718..f84f8cb36d 100644 --- a/assets/themes/personal/personal.json +++ b/assets/themes/personal/personal.json @@ -42,7 +42,7 @@ "shownByDefault": false }, "enableNoteImports": false, - "widenFactor": 1.2, "overpassMaxZoom": 15, + "widenFactor": 1.2, "#note": "The 'overpassMaxZoom' should be exactly the same as or less then the minzzom in overrideAll" } \ No newline at end of file diff --git a/assets/themes/trees/trees.json b/assets/themes/trees/trees.json index 88cb7c09a1..63799d09ed 100644 --- a/assets/themes/trees/trees.json +++ b/assets/themes/trees/trees.json @@ -70,6 +70,6 @@ "layers": [ "tree_node" ], - "widenFactor": 0.2, - "osmApiTileSize": 18 + "osmApiTileSize": 18, + "widenFactor": 0.2 }