From 922cebf9d1d0a68f90bd2f042bce0ada5ea0cc5e Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 26 Feb 2024 15:08:07 +0100 Subject: [PATCH] Refactoring: remove old and obsolete data fields in themes and layers --- assets/layers/aerialway/aerialway.json | 92 +++---- .../layers/assembly_point/assembly_point.json | 28 +- .../charging_station/charging_station.json | 240 +++++++++--------- .../climbing_opportunity.json | 4 +- assets/layers/crab_address/crab_address.json | 3 +- .../disaster_response/disaster_response.json | 62 ++--- .../layers/elongated_coin/elongated_coin.json | 2 +- assets/layers/ice_cream/ice_cream.json | 2 +- .../item_with_image/item_with_image.json | 16 +- .../maproulette_challenge.json | 3 +- .../mountain_rescue/mountain_rescue.json | 54 ++-- assets/layers/note/note.json | 4 +- .../osm_community_index.json | 3 +- .../playground_equipment.json | 72 +++--- assets/layers/postoffices/postoffices.json | 2 +- assets/layers/ski_piste/ski_piste.json | 126 ++++----- .../layers/souvenir_coin/souvenir_coin.json | 82 +++--- .../layers/souvenir_note/souvenir_note.json | 82 +++--- assets/layers/stripclub/stripclub.json | 3 +- assets/layers/summary/summary.json | 10 +- assets/layers/trolley_bay/trolley_bay.json | 74 +++--- .../walls_and_buildings.json | 2 +- assets/themes/bag/bag.json | 12 +- .../disaster_response/disaster_response.json | 20 +- assets/themes/grb/grb.json | 7 +- .../items_with_image/items_with_image.json | 2 +- .../mapcomplete-changes.json | 5 +- .../mapcomplete-changes.proto.json | 5 +- assets/themes/notes/notes.json | 3 +- .../openwindpowermap/openwindpowermap.json | 5 +- .../osm_community_index.json | 3 +- assets/themes/personal/personal.json | 3 - assets/themes/postal_codes/postal_codes.json | 3 +- assets/themes/postboxes/postboxes.json | 6 +- assets/themes/ski/ski.json | 4 +- assets/themes/speelplekken/speelplekken.json | 45 +--- .../street_lighting_assen.json | 3 +- assets/themes/trees/trees.json | 6 +- assets/themes/uk_addresses/uk_addresses.json | 12 +- assets/themes/velopark/velopark.json | 45 ++-- assets/themes/waste_assen/waste_assen.json | 6 +- assets/themes/width/width.json | 3 +- .../FeatureSource/Sources/LayoutSource.ts | 27 +- .../Conversion/CreateNoteImportLayer.ts | 1 - .../Conversion/LegacyJsonConvert.ts | 4 + .../ThemeConfig/Conversion/Validation.ts | 12 + .../ThemeConfig/Json/LayerConfigJson.ts | 20 -- .../ThemeConfig/Json/LayoutConfigJson.ts | 8 - .../OSM/Actions/ReplaceGeometryAction.spec.ts | 2 - 49 files changed, 574 insertions(+), 664 deletions(-) diff --git a/assets/layers/aerialway/aerialway.json b/assets/layers/aerialway/aerialway.json index deaac93c03..3522f9556e 100644 --- a/assets/layers/aerialway/aerialway.json +++ b/assets/layers/aerialway/aerialway.json @@ -1,4 +1,28 @@ { + "id": "aerialway", + "name": { + "en": "Aerialways", + "de": "Seilbahnen" + }, + "description": { + "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. " + }, + "source": { + "osmTags": { + "and": [ + "aerialway~*", + "aerialway!=pylon", + "aerialway!=station" + ] + } + }, + "title": { + "render": { + "en": "Aerialway {name}", + "de": "Seilbahn {name}" + } + }, "pointRendering": [ { "location": [ @@ -27,6 +51,27 @@ "labelCssClasses": "bg-white px-2 py-1 no-weblate" } ], + "lineRendering": [ + { + "width": "4", + "color": "black", + "imageAlongWay": [ + { + "if": "oneway=no", + "then": "./assets/png/twoway.png" + }, + { + "if": { + "or": [ + "oneway=yes", + "oneway=" + ] + }, + "then": "./assets/png/oneway.png" + } + ] + } + ], "tagRenderings": [ "images", { @@ -183,50 +228,5 @@ "de": "Die Seilbahn hat eine Länge von {_length:km} km" } } - ], - "lineRendering": [ - { - "width": "4", - "color": "black", - "imageAlongWay": [ - { - "if": "oneway=no", - "then": "./assets/png/twoway.png" - }, - { - "if": { - "or": [ - "oneway=yes", - "oneway=" - ] - }, - "then": "./assets/png/oneway.png" - } - ] - } - ], - "id": "aerialway", - "name": { - "en": "Aerialways", - "de": "Seilbahnen" - }, - "description": { - "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. " - }, - "source": { - "osmTags": { - "and": [ - "aerialway~*", - "aerialway!=pylon", - "aerialway!=station" - ] - } - }, - "title": { - "render": { - "en": "Aerialway {name}", - "de": "Seilbahn {name}" - } - } + ] } diff --git a/assets/layers/assembly_point/assembly_point.json b/assets/layers/assembly_point/assembly_point.json index 974cdd01ea..80499210f6 100644 --- a/assets/layers/assembly_point/assembly_point.json +++ b/assets/layers/assembly_point/assembly_point.json @@ -1,8 +1,5 @@ { - "allowMove": { - "enableRelocation": false, - "enableImproveAccuracy": true - }, + "id": "assembly_point", "name": { "en": "Emergency assembly points", "it": "Punti di raccolta per emergenze", @@ -13,9 +10,6 @@ "it": "Questo livello contiene punti di raccolta e aree di attesa in cui tutti i dipendenti, i passeggeri o una grande folla si riuniscono in caso di emergenza.", "de": "Diese Ebene enthält Sammelplätze und Wartebereiche, in denen sich alle Mitarbeiter, Fahrgäste oder eine große Menschenmenge im Notfall versammeln." }, - "docs": "https://wiki.openstreetmap.org/wiki/Tag:emergency%3Dassembly_point", - "id": "assembly_point", - "minzoom": 10, "source": { "osmTags": { "and": [ @@ -23,6 +17,13 @@ ] } }, + "minzoom": 10, + "title": { + "render": { + "en": "Assembly point during emergencies", + "de": "Sammelplatz bei Notfällen" + } + }, "pointRendering": [ { "iconSize": "20,20", @@ -50,12 +51,6 @@ ] } ], - "title": { - "render": { - "en": "Assembly point during emergencies", - "de": "Sammelplatz bei Notfällen" - } - }, "tagRenderings": [ "images", { @@ -154,5 +149,10 @@ } ] } - ] + ], + "allowMove": { + "enableRelocation": false, + "enableImproveAccuracy": true + }, + "docs": "https://wiki.openstreetmap.org/wiki/Tag:emergency%3Dassembly_point" } diff --git a/assets/layers/charging_station/charging_station.json b/assets/layers/charging_station/charging_station.json index 5b75592164..62fc62992f 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 Elektrofahrräder" + } + } + ], "tagRenderings": [ "images", { @@ -2316,103 +2412,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", @@ -2611,6 +2610,20 @@ ] } ], + "deletion": { + "softDeletionTags": { + "and": [ + "amenity=", + "disused:amenity=charging_station" + ] + }, + "neededChangesets": 10 + }, + "allowMove": { + "enableRelocation": false, + "enableImproveAccuracy": true + }, + "#": "no-question-hint-check", "units": [ { "maxstay": { @@ -2759,18 +2772,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/climbing_opportunity/climbing_opportunity.json b/assets/layers/climbing_opportunity/climbing_opportunity.json index 974d1fe65c..447fda7788 100644 --- a/assets/layers/climbing_opportunity/climbing_opportunity.json +++ b/assets/layers/climbing_opportunity/climbing_opportunity.json @@ -35,7 +35,6 @@ } }, "minzoom": 19, - "doCount": false, "title": { "render": { "en": "Climbing opportunity?", @@ -148,5 +147,6 @@ } ] } - ] + ], + "doCount": false } diff --git a/assets/layers/crab_address/crab_address.json b/assets/layers/crab_address/crab_address.json index 86805c235a..9b364003e7 100644 --- a/assets/layers/crab_address/crab_address.json +++ b/assets/layers/crab_address/crab_address.json @@ -5,8 +5,7 @@ "source": { "osmTags": "HUISNR~*", "geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/CRAB_2021_10_26/tile_{z}_{x}_{y}.geojson", - "geoJsonZoomLevel": 18, - "maxCacheAge": 0 + "geoJsonZoomLevel": 18 }, "calculatedTags": [ "_HNRLABEL=(() => {const lbl = feat.properties.HNRLABEL?.split('-')?.map(l => Number(l))?.filter(i => !isNaN (i)) ;if(lbl?.length != 2) {return feat.properties.HNRLABEL}; const addresses = []; for(let i = lbl[0]; i <= lbl[1]; i += 1){addresses.push(''+i);}; return addresses.join(';') })()" diff --git a/assets/layers/disaster_response/disaster_response.json b/assets/layers/disaster_response/disaster_response.json index dfecff37fd..22fac818ea 100644 --- a/assets/layers/disaster_response/disaster_response.json +++ b/assets/layers/disaster_response/disaster_response.json @@ -1,12 +1,5 @@ { "id": "disaster_response", - "title": { - "render": { - "en": "Disaster response organization", - "it": "Organizzazione per la risposta ai disastri", - "de": "Katastrophenschutzorganisation" - } - }, "name": { "en": "Disaster response organizations", "de": "Katastrophenschutzorganisationen" @@ -16,8 +9,36 @@ "it": "Questo livello contiene organizzazioni che hanno come obiettivo principale quello di aiutare la popolazione civile durante e dopo disastri naturali o antropogenici, lavorando nell'area colpita.", "de": "Diese Ebene umfasst Organisationen, deren Hauptziel es ist, der Zivilbevölkerung während und nach Natur- oder anthropogenen Katastrophen zu helfen, indem sie in dem betroffenen Gebiet tätig sind." }, - "docs": "https://wiki.openstreetmap.org/wiki/Tag:emergency%3Ddisaster_response", + "source": { + "osmTags": { + "and": [ + "emergency=disaster_response" + ] + } + }, "minzoom": 10, + "title": { + "render": { + "en": "Disaster response organization", + "it": "Organizzazione per la risposta ai disastri", + "de": "Katastrophenschutzorganisation" + } + }, + "pointRendering": [ + { + "iconSize": "40,40", + "location": [ + "point", + "centroid" + ], + "anchor": "bottom", + "marker": [ + { + "icon": "./assets/themes/disaster_response/CivilDefence.svg" + } + ] + } + ], "lineRendering": [ { "color": "#6BC4F7", @@ -36,28 +57,6 @@ ] } ], - "source": { - "osmTags": { - "and": [ - "emergency=disaster_response" - ] - } - }, - "pointRendering": [ - { - "iconSize": "40,40", - "location": [ - "point", - "centroid" - ], - "anchor": "bottom", - "marker": [ - { - "icon": "./assets/themes/disaster_response/CivilDefence.svg" - } - ] - } - ], "tagRenderings": [ "images", "website", @@ -77,5 +76,6 @@ "de": "Diese Organisation heißt {name}" } } - ] + ], + "docs": "https://wiki.openstreetmap.org/wiki/Tag:emergency%3Ddisaster_response" } diff --git a/assets/layers/elongated_coin/elongated_coin.json b/assets/layers/elongated_coin/elongated_coin.json index 398b7921f0..d76da9ad76 100644 --- a/assets/layers/elongated_coin/elongated_coin.json +++ b/assets/layers/elongated_coin/elongated_coin.json @@ -441,4 +441,4 @@ ], "deletion": true, "allowMove": true -} \ No newline at end of file +} diff --git a/assets/layers/ice_cream/ice_cream.json b/assets/layers/ice_cream/ice_cream.json index 8b5ea0568f..afbb1a36c3 100644 --- a/assets/layers/ice_cream/ice_cream.json +++ b/assets/layers/ice_cream/ice_cream.json @@ -4,7 +4,6 @@ "en": "Ice cream parlors", "de": "Eisdielen" }, - "minzoom": 14, "description": { "en": "A place where ice cream is sold over the counter", "de": "Ein Ort, an dem Eiscreme an der Theke verkauft wird" @@ -12,6 +11,7 @@ "source": { "osmTags": "amenity=ice_cream" }, + "minzoom": 14, "title": { "render": { "en": "Ice cream parlor", diff --git a/assets/layers/item_with_image/item_with_image.json b/assets/layers/item_with_image/item_with_image.json index 8209d2cd12..f289ad7aae 100644 --- a/assets/layers/item_with_image/item_with_image.json +++ b/assets/layers/item_with_image/item_with_image.json @@ -1,7 +1,9 @@ { "id": "item_with_image", + "name": { + "en": "Items with at least one image" + }, "description": "All items with an image. All alone, not a layer which is relevant for any MapComplete theme, as it is a random collection of items. However, when put into the databank, this allows to quickly fetch (the URL of) pictures nearby a different object, to quickly link this", - "minzoom": 14, "source": { "osmTags": { "or": [ @@ -15,9 +17,7 @@ ] } }, - "tagRenderings": [ - "images" - ], + "minzoom": 14, "title": { "render": { "en": "POI with image" @@ -31,10 +31,6 @@ } ] }, - "name": { - "en": "Items with at least one image" - }, - "lineRendering": [], "pointRendering": [ { "marker": [ @@ -47,5 +43,9 @@ "point" ] } + ], + "lineRendering": [], + "tagRenderings": [ + "images" ] } diff --git a/assets/layers/maproulette_challenge/maproulette_challenge.json b/assets/layers/maproulette_challenge/maproulette_challenge.json index 2f192ebd8c..d7b2fabd06 100644 --- a/assets/layers/maproulette_challenge/maproulette_challenge.json +++ b/assets/layers/maproulette_challenge/maproulette_challenge.json @@ -10,8 +10,7 @@ }, "source": { "osmTags": "mr_taskId~*", - "geoJson": "https://maproulette.org/api/v2/challenge/view/27971", - "isOsmCache": false + "geoJson": "https://maproulette.org/api/v2/challenge/view/27971" }, "title": { "render": { diff --git a/assets/layers/mountain_rescue/mountain_rescue.json b/assets/layers/mountain_rescue/mountain_rescue.json index 2a17c199fa..a1f25797d8 100644 --- a/assets/layers/mountain_rescue/mountain_rescue.json +++ b/assets/layers/mountain_rescue/mountain_rescue.json @@ -1,6 +1,23 @@ { - "credits": "Not logged in", + "id": "mountain_rescue", + "name": { + "en": "Mountain rescue stations", + "de": "Bergrettungsstationen" + }, + "description": { + "en": "A building where first aid responders store material and might be on watch", + "de": "Ein Gebäude, in dem die Ersthelfer Material lagern und möglicherweise Wache halten" + }, + "source": { + "osmTags": "emergency=mountain_rescue" + }, "minzoom": 10, + "title": { + "render": { + "en": "Mountain rescue station", + "de": "Bergrettungsstation" + } + }, "pointRendering": [ { "location": [ @@ -19,37 +36,12 @@ "rotation": "45" } ], - "tagRenderings": [ - "images" - ], "lineRendering": [ { "width": "3", "color": "#ed333b" } ], - "id": "mountain_rescue", - "name": { - "en": "Mountain rescue stations", - "de": "Bergrettungsstationen" - }, - "description": { - "en": "A building where first aid responders store material and might be on watch", - "de": "Ein Gebäude, in dem die Ersthelfer Material lagern und möglicherweise Wache halten" - }, - "source": { - "osmTags": "emergency=mountain_rescue" - }, - "title": { - "render": { - "en": "Mountain rescue station", - "de": "Bergrettungsstation" - } - }, - "deletion": true, - "allowMove": { - "enableRelocation": false - }, "presets": [ { "title": { @@ -60,5 +52,13 @@ "emergency=mountain_rescue" ] } - ] + ], + "tagRenderings": [ + "images" + ], + "deletion": true, + "allowMove": { + "enableRelocation": false + }, + "credits": "Not logged in" } diff --git a/assets/layers/note/note.json b/assets/layers/note/note.json index a39f53107d..a949307506 100644 --- a/assets/layers/note/note.json +++ b/assets/layers/note/note.json @@ -12,9 +12,7 @@ "source": { "osmTags": "date_created~*", "geoJson": "https://api.openstreetmap.org/api/0.6/notes.json?limit=10000&closed=7&bbox={x_min},{y_min},{x_max},{y_max}", - "geoJsonZoomLevel": 12, - "maxCacheAge": 0, - "isOsmCache": false + "geoJsonZoomLevel": 12 }, "calculatedTags": [ "_total_comments:=get(feat)('comments').length", diff --git a/assets/layers/osm_community_index/osm_community_index.json b/assets/layers/osm_community_index/osm_community_index.json index cde21addc2..54b074cc31 100644 --- a/assets/layers/osm_community_index/osm_community_index.json +++ b/assets/layers/osm_community_index/osm_community_index.json @@ -19,8 +19,7 @@ "source": { "geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/community_index/tile_{z}_{x}_{y}.geojson", "geoJsonZoomLevel": 6, - "osmTags": "resources~*", - "isOsmCache": false + "osmTags": "resources~*" }, "calculatedTags": [ "_community_links=Object.values(JSON.parse(feat.properties.resources || '{}')).map(value =>{return value.resolved.nameHTML + '
 ' + value.resolved.descriptionHTML}).join('
')" diff --git a/assets/layers/playground_equipment/playground_equipment.json b/assets/layers/playground_equipment/playground_equipment.json index 9ee9450e4c..e2a40033d1 100644 --- a/assets/layers/playground_equipment/playground_equipment.json +++ b/assets/layers/playground_equipment/playground_equipment.json @@ -1,5 +1,20 @@ { + "id": "playground_equipment", + "name": { + "en": "Playground equipment" + }, + "description": { + "en": "Layer showing playground equipment" + }, + "source": { + "osmTags": "playground~*" + }, "minzoom": 18, + "title": { + "render": { + "en": "Playground device" + } + }, "pointRendering": [ { "location": [ @@ -18,6 +33,25 @@ "iconSize": "20,20" } ], + "lineRendering": [ + { + "width": 1, + "color": "blue" + } + ], + "presets": [ + { + "tags": [ + "playground=yes" + ], + "title": { + "en": "a playground device" + }, + "description": { + "en": "An exact type is asked later" + } + } + ], "tagRenderings": [ "images", { @@ -299,39 +333,5 @@ } } ], - "lineRendering": [ - { - "width": 1, - "color": "blue" - } - ], - "id": "playground_equipment", - "name": { - "en": "Playground equipment" - }, - "description": { - "en": "Layer showing playground equipment" - }, - "source": { - "osmTags": "playground~*" - }, - "title": { - "render": { - "en": "Playground device" - } - }, - "allowMove": true, - "presets": [ - { - "tags": [ - "playground=yes" - ], - "title": { - "en": "a playground device" - }, - "description": { - "en": "An exact type is asked later" - } - } - ] -} \ No newline at end of file + "allowMove": true +} diff --git a/assets/layers/postoffices/postoffices.json b/assets/layers/postoffices/postoffices.json index 69eb6e9f09..8924ebf300 100644 --- a/assets/layers/postoffices/postoffices.json +++ b/assets/layers/postoffices/postoffices.json @@ -634,4 +634,4 @@ ] } ] -} \ 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 1f2d5ee305..5075610688 100644 --- a/assets/layers/ski_piste/ski_piste.json +++ b/assets/layers/ski_piste/ski_piste.json @@ -1,4 +1,32 @@ { + "id": "ski_piste", + "name": { + "en": "Ski and snowboard pistes", + "de": "Ski- und Snowboardpisten" + }, + "description": { + "en": "Ski and snowboard pistes", + "de": "Ski- und Snowboardpisten" + }, + "source": { + "osmTags": { + "and": [ + { + "or": [ + "piste:type=downhill", + "piste:type=connection" + ] + }, + "area!=yes" + ] + } + }, + "title": { + "render": { + "en": "Ski piste {name}", + "de": "Skipiste {name}" + } + }, "pointRendering": [ { "location": [ @@ -12,6 +40,40 @@ ] } ], + "lineRendering": [ + { + "width": "10", + "color": { + "mappings": [ + { + "then": "green", + "if": "piste:difficulty=novice" + }, + { + "if": "piste:difficulty=easy", + "then": "blue" + }, + { + "if": "piste:difficulty=intermediate", + "then": "red" + }, + { + "if": "piste:difficulty=advanced", + "then": "black" + }, + { + "if": "piste:difficulty=expert", + "then": "orange" + }, + { + "if": "piste:difficulty=", + "then": "gray" + } + ] + }, + "imageAlongWay": "./assets/png/oneway.png" + } + ], "tagRenderings": [ "images", { @@ -73,67 +135,5 @@ "de": "Dieser Teil der Skipiste hat eine Länge von {_length:km} km" } } - ], - "lineRendering": [ - { - "width": "10", - "color": { - "mappings": [ - { - "then": "green", - "if": "piste:difficulty=novice" - }, - { - "if": "piste:difficulty=easy", - "then": "blue" - }, - { - "if": "piste:difficulty=intermediate", - "then": "red" - }, - { - "if": "piste:difficulty=advanced", - "then": "black" - }, - { - "if": "piste:difficulty=expert", - "then": "orange" - }, - { - "if": "piste:difficulty=", - "then": "gray" - } - ] - }, - "imageAlongWay": "./assets/png/oneway.png" - } - ], - "id": "ski_piste", - "name": { - "en": "Ski and snowboard pistes", - "de": "Ski- und Snowboardpisten" - }, - "description": { - "en": "Ski and snowboard pistes", - "de": "Ski- und Snowboardpisten" - }, - "source": { - "osmTags": { - "and": [ - { - "or": [ - "piste:type=downhill", - "piste:type=connection" - ] - }, - "area!=yes" - ] - } - }, - "title": { - "render": { - "en": "Ski piste {name}", - "de": "Skipiste {name}" - } - } + ] } diff --git a/assets/layers/souvenir_coin/souvenir_coin.json b/assets/layers/souvenir_coin/souvenir_coin.json index ee56390394..601f7174e1 100644 --- a/assets/layers/souvenir_coin/souvenir_coin.json +++ b/assets/layers/souvenir_coin/souvenir_coin.json @@ -1,4 +1,24 @@ { + "id": "souvenir_coin", + "name": { + "en": "Souvenir Coin Machines" + }, + "description": { + "en": "Layer showing machines selling souvenir coins" + }, + "source": { + "osmTags": { + "and": [ + "amenity=vending_machine", + "vending~.*souvenir_coins.*" + ] + } + }, + "title": { + "render": { + "en": "Souvenir Coin Machine" + } + }, "pointRendering": [ { "location": [ @@ -22,6 +42,26 @@ ] } ], + "lineRendering": [ + { + "width": 1, + "color": "blue" + } + ], + "presets": [ + { + "title": { + "en": "a souvenir coin machine" + }, + "description": { + "en": "Add a machine selling souvenir coins" + }, + "tags": [ + "amenity=vending_machine", + "vending=souvenir_coins" + ] + } + ], "tagRenderings": [ "images", "opening_hours_24_7", @@ -110,46 +150,6 @@ "level", "check_date" ], - "lineRendering": [ - { - "width": 1, - "color": "blue" - } - ], - "id": "souvenir_coin", - "name": { - "en": "Souvenir Coin Machines" - }, - "description": { - "en": "Layer showing machines selling souvenir coins" - }, - "source": { - "osmTags": { - "and": [ - "amenity=vending_machine", - "vending~.*souvenir_coins.*" - ] - } - }, - "title": { - "render": { - "en": "Souvenir Coin Machine" - } - }, - "presets": [ - { - "title": { - "en": "a souvenir coin machine" - }, - "description": { - "en": "Add a machine selling souvenir coins" - }, - "tags": [ - "amenity=vending_machine", - "vending=souvenir_coins" - ] - } - ], "filter": [ "open_now", "accepts_debit_cards", @@ -157,4 +157,4 @@ ], "deletion": true, "allowMove": true -} \ No newline at end of file +} diff --git a/assets/layers/souvenir_note/souvenir_note.json b/assets/layers/souvenir_note/souvenir_note.json index df79f05855..da2750ea94 100644 --- a/assets/layers/souvenir_note/souvenir_note.json +++ b/assets/layers/souvenir_note/souvenir_note.json @@ -1,4 +1,24 @@ { + "id": "souvenir_note", + "name": { + "en": "Souvenir Banknote Machines" + }, + "description": { + "en": "Layer showing machines selling souvenir banknotes" + }, + "source": { + "osmTags": { + "and": [ + "amenity=vending_machine", + "vending~.*souvenir_notes.*" + ] + } + }, + "title": { + "render": { + "en": "Souvenir Banknote Machine" + } + }, "pointRendering": [ { "location": [ @@ -22,6 +42,26 @@ ] } ], + "lineRendering": [ + { + "width": 1, + "color": "blue" + } + ], + "presets": [ + { + "title": { + "en": "a souvenir banknote machine" + }, + "description": { + "en": "Add a machine selling souvenir banknotes" + }, + "tags": [ + "amenity=vending_machine", + "vending=souvenir_notes" + ] + } + ], "tagRenderings": [ "images", "opening_hours_24_7", @@ -128,46 +168,6 @@ "level", "check_date" ], - "lineRendering": [ - { - "width": 1, - "color": "blue" - } - ], - "id": "souvenir_note", - "name": { - "en": "Souvenir Banknote Machines" - }, - "description": { - "en": "Layer showing machines selling souvenir banknotes" - }, - "source": { - "osmTags": { - "and": [ - "amenity=vending_machine", - "vending~.*souvenir_notes.*" - ] - } - }, - "title": { - "render": { - "en": "Souvenir Banknote Machine" - } - }, - "presets": [ - { - "title": { - "en": "a souvenir banknote machine" - }, - "description": { - "en": "Add a machine selling souvenir banknotes" - }, - "tags": [ - "amenity=vending_machine", - "vending=souvenir_notes" - ] - } - ], "filter": [ "open_now", "accepts_debit_cards", @@ -175,4 +175,4 @@ ], "deletion": true, "allowMove": true -} \ No newline at end of file +} diff --git a/assets/layers/stripclub/stripclub.json b/assets/layers/stripclub/stripclub.json index 0b92c6c9f9..0484694028 100644 --- a/assets/layers/stripclub/stripclub.json +++ b/assets/layers/stripclub/stripclub.json @@ -9,8 +9,7 @@ "de": "Ein Ort, an dem erotische Tanz-, Striptease- oder Lapdances kommerziell durchgeführt werden. " }, "source": { - "osmTags": "amenity=stripclub", - "isOsmCache": false + "osmTags": "amenity=stripclub" }, "minzoom": 6, "title": { diff --git a/assets/layers/summary/summary.json b/assets/layers/summary/summary.json index deccd5e6ba..ce21243529 100644 --- a/assets/layers/summary/summary.json +++ b/assets/layers/summary/summary.json @@ -7,9 +7,6 @@ "en": "Summary" } }, - "tagRenderings": [ - "all_tags" - ], "pointRendering": [ { "location": [ @@ -17,11 +14,12 @@ "centroid" ], "iconSize": "40,40", - "label": { - "render": "{total_metric}" - }, + "label": "{total_metric}", "labelCss": "background: #ffffffbb", "labelCssClasses": "w-12 text-lg rounded-xl p-1 px-2" } + ], + "tagRenderings": [ + "all_tags" ] } diff --git a/assets/layers/trolley_bay/trolley_bay.json b/assets/layers/trolley_bay/trolley_bay.json index 657ac62616..0366ddcafb 100644 --- a/assets/layers/trolley_bay/trolley_bay.json +++ b/assets/layers/trolley_bay/trolley_bay.json @@ -8,19 +8,42 @@ "en": "Find trolley bays for shopping trolleys.", "de": "Finde Einkaufswagenbuchten für Einkaufswagen." }, - "title": { - "en": "Trolley Bay", - "de": "Einkaufswagenbucht" - }, "source": { "osmTags": "amenity=trolley_bay" }, "minzoom": 18, - "allowMove": { - "enableImproveAccuracy": true, - "enableRelocation": true + "title": { + "en": "Trolley Bay", + "de": "Einkaufswagenbucht" }, - "deletion": true, + "pointRendering": [ + { + "location": [ + "point", + "centroid" + ], + "marker": [ + { + "icon": "./assets/layers/trolley_bay/trolley_bay.svg" + } + ] + } + ], + "presets": [ + { + "title": { + "en": "a trolley bay", + "de": "eine Einkaufswagenbucht" + }, + "tags": [ + "amenity=trolley_bay" + ], + "description": { + "en": "A trolley bay for parking shopping carts.", + "de": "Ein Platz zum Abstellen von Einkaufswagen." + } + } + ], "tagRenderings": [ { "id": "covered", @@ -194,32 +217,9 @@ "id": "indoor" } ], - "presets": [ - { - "title": { - "en": "a trolley bay", - "de": "eine Einkaufswagenbucht" - }, - "tags": [ - "amenity=trolley_bay" - ], - "description": { - "en": "A trolley bay for parking shopping carts.", - "de": "Ein Platz zum Abstellen von Einkaufswagen." - } - } - ], - "pointRendering": [ - { - "location": [ - "point", - "centroid" - ], - "marker": [ - { - "icon": "./assets/layers/trolley_bay/trolley_bay.svg" - } - ] - } - ] -} \ No newline at end of file + "deletion": true, + "allowMove": { + "enableImproveAccuracy": true, + "enableRelocation": true + } +} diff --git a/assets/layers/walls_and_buildings/walls_and_buildings.json b/assets/layers/walls_and_buildings/walls_and_buildings.json index 53a482adc1..37da1936d9 100644 --- a/assets/layers/walls_and_buildings/walls_and_buildings.json +++ b/assets/layers/walls_and_buildings/walls_and_buildings.json @@ -31,7 +31,6 @@ ], "minzoom": 18, "shownByDefault": false, - "isCounted": false, "title": { "render": { "en": "Wall or building", @@ -122,6 +121,7 @@ "condition": "_biggest_width_id~*" } ], + "isCounted": false, "units": [ { "width": { diff --git a/assets/themes/bag/bag.json b/assets/themes/bag/bag.json index d9a70c5906..088c53015d 100644 --- a/assets/themes/bag/bag.json +++ b/assets/themes/bag/bag.json @@ -50,8 +50,7 @@ "title": "OSM Building", "description": "Layer showing buildings that are in OpenStreetMap", "source": { - "osmTags": "building~*", - "maxCacheAge": 0 + "osmTags": "building~*" }, "minzoom": 18, "doCount": false, @@ -161,8 +160,7 @@ "addr:postcode~*", "addr:street~*" ] - }, - "maxCacheAge": 0 + } }, "minzoom": 18, "doCount": false, @@ -204,8 +202,7 @@ "source": { "geoJson": "https://service.pdok.nl/lv/bag/wfs/v2_0?request=GetFeature&service=WFS&version=2.0.0&outputFormat=application%2Fjson%3B%20subtype%3Dgeojson&typeName=bag%3Apand&bbox={x_min}%2C{y_min}%2C{x_max}%2C{y_max}%2CCRS84&srsName=EPSG%3A4326", "geoJsonZoomLevel": 18, - "osmTags": "identificatie~*", - "maxCacheAge": 0 + "osmTags": "identificatie~*" }, "minzoom": 18, "calculatedTags": [ @@ -395,8 +392,7 @@ "source": { "geoJson": "https://service.pdok.nl/lv/bag/wfs/v2_0?request=GetFeature&service=WFS&version=2.0.0&outputFormat=application%2Fjson%3B%20subtype%3Dgeojson&typeName=bag%3Averblijfsobject&bbox={x_min}%2C{y_min}%2C{x_max}%2C{y_max}%2CCRS84&srsName=EPSG%3A4326", "geoJsonZoomLevel": 19, - "osmTags": "identificatie~*", - "maxCacheAge": 0 + "osmTags": "identificatie~*" }, "minzoom": 18, "calculatedTags": [ diff --git a/assets/themes/disaster_response/disaster_response.json b/assets/themes/disaster_response/disaster_response.json index d7ba9d0b0a..0869c15789 100644 --- a/assets/themes/disaster_response/disaster_response.json +++ b/assets/themes/disaster_response/disaster_response.json @@ -1,23 +1,23 @@ { - "description": { - "en": "This map contains elements meant for disaster preparedness and response.", - "it": "Questa mappa contiene elementi pensati per la preparazione e risposta ai disastri.", - "de": "Diese Karte enthält Elemente, die der Katastrophenvorsorge und dem Katastrophenschutz dienen.", - "es": "Este mapa contiene elementos destinados a la preparación y respuesta ante desastres." - }, - "docs": "https://wiki.openstreetmap.org/wiki/Emergency_facilities_and_amenities", - "icon": "./assets/themes/disaster_response/CivilDefence.svg", "id": "disaster_response", - "socialImage": "./assets/themes/disaster_response/social.svg", "title": { "en": "Disaster response", "it": "Risposta ai disastri", "de": "Katastrophenschutz", "es": "Respuesta ante desastres" }, + "description": { + "en": "This map contains elements meant for disaster preparedness and response.", + "it": "Questa mappa contiene elementi pensati per la preparazione e risposta ai disastri.", + "de": "Diese Karte enthält Elemente, die der Katastrophenvorsorge und dem Katastrophenschutz dienen.", + "es": "Este mapa contiene elementos destinados a la preparación y respuesta ante desastres." + }, + "icon": "./assets/themes/disaster_response/CivilDefence.svg", + "socialImage": "./assets/themes/disaster_response/social.svg", "layers": [ "hospital", "assembly_point", "disaster_response" - ] + ], + "docs": "https://wiki.openstreetmap.org/wiki/Emergency_facilities_and_amenities" } \ No newline at end of file diff --git a/assets/themes/grb/grb.json b/assets/themes/grb/grb.json index 89461b7acf..8ed73d20b3 100644 --- a/assets/themes/grb/grb.json +++ b/assets/themes/grb/grb.json @@ -42,8 +42,7 @@ }, "building~*" ] - }, - "maxCacheAge": 0 + } }, "title": "OSM-gebouw", "tagRenderings": [ @@ -290,7 +289,6 @@ "geoJson": "https://betadata.grbosm.site/grb?bbox={x_min},{y_min},{x_max},{y_max}", "geoJsonZoomLevel": 18, "mercatorCrs": true, - "maxCacheAge": 0, "idKey": "osm_id" }, "name": "GRB geometries", @@ -587,8 +585,7 @@ ] } ] - }, - "maxCacheAge": 0 + } }, "title": { "render": { diff --git a/assets/themes/items_with_image/items_with_image.json b/assets/themes/items_with_image/items_with_image.json index 17ca1a320f..b96f05fe4b 100644 --- a/assets/themes/items_with_image/items_with_image.json +++ b/assets/themes/items_with_image/items_with_image.json @@ -1,6 +1,5 @@ { "id": "items_with_image", - "hideFromOverview": true, "title": { "en": "All items with images" }, @@ -8,6 +7,7 @@ "en": "A map showing all items on OSM which have an image. This theme is a very bad fit for MapComplete as someone is not able to directly add a picture. However, this theme is mostly here to include this all into the database, which'll allow this to quickly fetch images nearby for other features" }, "icon": "./assets/layers/item_with_image/camera.svg", + "hideFromOverview": true, "layers": [ "item_with_image" ] diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.json index 591381bdf9..22f2c17633 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -14,8 +14,6 @@ "startLat": 0, "startLon": 0, "startZoom": 1, - "widenFactor": 0.05, - "clustering": false, "layers": [ { "id": "mapcomplete-changes", @@ -26,8 +24,7 @@ "source": { "osmTags": "editor~*", "geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/mapcomplete-changes/tile_{z}_{x}_{y}.geojson", - "geoJsonZoomLevel": 8, - "maxCacheAge": 0 + "geoJsonZoomLevel": 8 }, "title": { "render": { diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.proto.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.proto.json index 95d0dc691f..4a55a1cf13 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.proto.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.proto.json @@ -14,8 +14,6 @@ "startLat": 0, "startLon": 0, "startZoom": 1, - "widenFactor": 0.05, - "clustering": false, "layers": [ { "id": "mapcomplete-changes", @@ -26,8 +24,7 @@ "source": { "osmTags": "editor~*", "geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/mapcomplete-changes/tile_{z}_{x}_{y}.geojson", - "geoJsonZoomLevel": 8, - "maxCacheAge": 0 + "geoJsonZoomLevel": 8 }, "title": { "render": { diff --git a/assets/themes/notes/notes.json b/assets/themes/notes/notes.json index 925c4d670b..c27ee01958 100644 --- a/assets/themes/notes/notes.json +++ b/assets/themes/notes/notes.json @@ -32,6 +32,5 @@ "note", "fixme" ], - "enableDownload": true, - "clustering": false + "enableDownload": true } \ No newline at end of file diff --git a/assets/themes/openwindpowermap/openwindpowermap.json b/assets/themes/openwindpowermap/openwindpowermap.json index 8e87a1aa40..f84d0b4b25 100644 --- a/assets/themes/openwindpowermap/openwindpowermap.json +++ b/assets/themes/openwindpowermap/openwindpowermap.json @@ -41,8 +41,5 @@ ], "layers": [ "windturbine" - ], - "clustering": { - "maxZoom": 8 - } + ] } \ No newline at end of file diff --git a/assets/themes/osm_community_index/osm_community_index.json b/assets/themes/osm_community_index/osm_community_index.json index ee7c9a1e96..80cb4c890e 100644 --- a/assets/themes/osm_community_index/osm_community_index.json +++ b/assets/themes/osm_community_index/osm_community_index.json @@ -36,6 +36,5 @@ "startLon": 4.351697, "layers": [ "osm_community_index" - ], - "clustering": false + ] } \ No newline at end of file diff --git a/assets/themes/personal/personal.json b/assets/themes/personal/personal.json index 9909ee88c3..8095d3e718 100644 --- a/assets/themes/personal/personal.json +++ b/assets/themes/personal/personal.json @@ -44,8 +44,5 @@ "enableNoteImports": false, "widenFactor": 1.2, "overpassMaxZoom": 15, - "clustering": { - "maxZoom": 19 - }, "#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/postal_codes/postal_codes.json b/assets/themes/postal_codes/postal_codes.json index 2ae872fe14..3345146ec1 100644 --- a/assets/themes/postal_codes/postal_codes.json +++ b/assets/themes/postal_codes/postal_codes.json @@ -231,6 +231,5 @@ } ], "overpassTimeout": 180, - "widenFactor": 0.05, - "clustering": false + "widenFactor": 0.05 } diff --git a/assets/themes/postboxes/postboxes.json b/assets/themes/postboxes/postboxes.json index 13ce50ff73..38e9045ee2 100644 --- a/assets/themes/postboxes/postboxes.json +++ b/assets/themes/postboxes/postboxes.json @@ -103,9 +103,5 @@ } } ], - "widenFactor": 1.5, - "clustering": { - "maxZoom": 14, - "minNeededElements": 100 - } + "widenFactor": 1.5 } \ No newline at end of file diff --git a/assets/themes/ski/ski.json b/assets/themes/ski/ski.json index 6ce871f339..192ae35fe6 100644 --- a/assets/themes/ski/ski.json +++ b/assets/themes/ski/ski.json @@ -11,7 +11,6 @@ "es": "Todo lo que necesitas para esquiar" }, "icon": "./assets/layers/aerialway/chair_lift.svg", - "enableTerrain": true, "layers": [ "ski_piste", "aerialway", @@ -50,5 +49,6 @@ ] } } - ] + ], + "enableTerrain": true } diff --git a/assets/themes/speelplekken/speelplekken.json b/assets/themes/speelplekken/speelplekken.json index 7955d434aa..037199ffad 100644 --- a/assets/themes/speelplekken/speelplekken.json +++ b/assets/themes/speelplekken/speelplekken.json @@ -23,8 +23,7 @@ "title": null, "source": { "geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete/master/assets/themes/speelplekken/shadow.geojson", - "osmTags": "shadow=yes", - "isOsmCache": false + "osmTags": "shadow=yes" }, "pointRendering": null, "lineRendering": [ @@ -37,11 +36,6 @@ { "builtin": "play_forest", "override": { - "source": { - "geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/speelplekken_cache/speelplekken_{layer}_{z}_{x}_{y}.geojson", - "geoJsonZoomLevel": 14, - "isOsmCache": true - }, "minzoom": 12, "calculatedTags": [ "_is_shadowed=overlapWith(feat)('shadow').length > 0 ? 'yes': ''", @@ -53,12 +47,6 @@ "builtin": "playground", "override": { "minzoom": 14, - "source": { - "geoJsonLocal": "http://127.0.0.1:8080/speelplekken_{layer}_{z}_{x}_{y}.geojson", - "geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/speelplekken_cache/speelplekken_{layer}_{z}_{x}_{y}.geojson", - "geoJsonZoomLevel": 14, - "isOsmCache": true - }, "calculatedTags": [ "_is_shadowed=overlapWith(feat)('shadow').length > 0 ? 'yes': ''", "_video:id=feat.properties.video === undefined ? undefined : new URL(feat.properties.video).searchParams.get('v')" @@ -69,12 +57,6 @@ "builtin": "village_green", "override": { "minzoom": 14, - "source": { - "geoJsonLocal": "http://127.0.0.1:8080/speelplekken_{layer}_{z}_{x}_{y}.geojson", - "geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/speelplekken_cache/speelplekken_{layer}_{z}_{x}_{y}.geojson", - "geoJsonZoomLevel": 14, - "isOsmCache": true - }, "calculatedTags": [ "_is_shadowed=overlapWith(feat)('shadow').length > 0 ? 'yes': ''", "_video:id=feat.properties.video === undefined ? undefined : new URL(feat.properties.video).searchParams.get('v')" @@ -85,12 +67,6 @@ "builtin": "sport_pitch", "override": { "minzoom": 15, - "source": { - "geoJsonLocal": "http://127.0.0.1:8080/speelplekken_{layer}_{z}_{x}_{y}.geojson", - "geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/speelplekken_cache/speelplekken_{layer}_{z}_{x}_{y}.geojson", - "geoJsonZoomLevel": 14, - "isOsmCache": true - }, "calculatedTags": [ "_is_shadowed=overlapWith(feat)('shadow').length > 0 ? 'yes': ''", "_video:id=feat.properties.video === undefined ? undefined : new URL(feat.properties.video).searchParams.get('v')" @@ -102,13 +78,7 @@ "override": { "calculatedTags": [ "_is_shadowed=overlapWith(feat)('shadow').length > 0 ? 'yes': ''" - ], - "source": { - "geoJsonLocal": "http://127.0.0.1:8080/speelplekken_{layer}_{z}_{x}_{y}.geojson", - "geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/speelplekken_cache/speelplekken_{layer}_{z}_{x}_{y}.geojson", - "geoJsonZoomLevel": 14, - "isOsmCache": true - } + ] } }, { @@ -124,10 +94,7 @@ "route=foot", "operator~[pP]rovincie Antwerpen" ] - }, - "geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/speelplekken_cache/speelplekken_{layer}_{z}_{x}_{y}.geojson", - "geoJsonZoomLevel": 14, - "isOsmCache": true + } }, "title": { "render": "Wandeling {name}", @@ -260,9 +227,5 @@ 51.23978120350654 ] ], - "widenFactor": 1.2, - "clustering": { - "maxZoom": 6, - "minNeededElements": 100 - } + "widenFactor": 1.2 } diff --git a/assets/themes/street_lighting_assen/street_lighting_assen.json b/assets/themes/street_lighting_assen/street_lighting_assen.json index cc22208034..1cca1a0ad5 100644 --- a/assets/themes/street_lighting_assen/street_lighting_assen.json +++ b/assets/themes/street_lighting_assen/street_lighting_assen.json @@ -23,8 +23,7 @@ "osmTags": "Lichtmastnummer~*", "#geoJson": "https://opendata.arcgis.com/datasets/ba37cdb372064b3199c548b75d16a609_0.geojson", "geoJson": "https://robinlinde.github.io/tiles/assen_street_lighting/{z}/{x}/{y}.json", - "geoJsonZoomLevel": 16, - "isOsmCache": false + "geoJsonZoomLevel": 16 }, "calculatedTags": [ "_closest_osm_street_lamp=closest(feat)('street_lamps')?.properties?.id", diff --git a/assets/themes/trees/trees.json b/assets/themes/trees/trees.json index 256df236d2..88cb7c09a1 100644 --- a/assets/themes/trees/trees.json +++ b/assets/themes/trees/trees.json @@ -71,9 +71,5 @@ "tree_node" ], "widenFactor": 0.2, - "osmApiTileSize": 18, - "clustering": { - "maxZoom": 19, - "minNeededElements": 25 - } + "osmApiTileSize": 18 } diff --git a/assets/themes/uk_addresses/uk_addresses.json b/assets/themes/uk_addresses/uk_addresses.json index 97bf12a81a..f86ae5f9d2 100644 --- a/assets/themes/uk_addresses/uk_addresses.json +++ b/assets/themes/uk_addresses/uk_addresses.json @@ -32,8 +32,7 @@ "source": { "geoJson": "https://osm-uk-addresses.russss.dev/inspire/{z}/{x}/{y}.json", "osmTags": "inspireid~*", - "geoJsonZoomLevel": 18, - "isOsmCache": false + "geoJsonZoomLevel": 18 }, "minzoom": 18, "calculatedTags": [ @@ -69,8 +68,7 @@ "id!~node/.*" ] }, - "geoJsonZoomLevel": 16, - "isOsmCache": false + "geoJsonZoomLevel": 16 }, "name": "Addresses to check", "minzoom": 18, @@ -703,9 +701,5 @@ ], "enableShareScreen": false, "enableMoreQuests": false, - "widenFactor": 1.01, - "clustering": { - "minNeededFeatures": 25, - "maxZoom": 16 - } + "widenFactor": 1.01 } diff --git a/assets/themes/velopark/velopark.json b/assets/themes/velopark/velopark.json index 2beb583057..c0a8f9aabc 100644 --- a/assets/themes/velopark/velopark.json +++ b/assets/themes/velopark/velopark.json @@ -3,45 +3,33 @@ "title": { "nl": "Velopark naar OpenStreetMap sync tool" }, - "shortDescription": { - "en": "A tool to import data from velopark.be into OpenStreetMap", - "nl": "Een hulpmiddel om data van velopark.be in OpenStreetMap in te laden" - }, + "mustHaveLanguage": [ + "nl" + ], "description": { "en": "

Velopark.be is a website collecting data about bicycle parkings in a semi-crowdsourced way. However, only 'authorized' instances are allowed to make changes there, in practice the operator of the bicycle parking such as SNCB, de Lijn or the municipality. They have now decided to synchronize their dataset with OpenStreetMap, and this MapComplete-instance is set up to help link and import their data into OpenStreetMap.

How to use: That's it! Thanks for helping to import this!", "nl": "

Velopark.be is een website die data verzamelt over fietsenstallingen in een semi-crowdsource manier. Hierbij kunnen enkel geautorizeerde gebruikers data bijdragen, in de praktijk de uitbaters van de fietsenstallingen zoals de bevoegde gemeentebesturen, de NMBS of de Lijn. Velopark.be heeft nu beslist om hun data met OpenStreetMap te synchronizeren. Deze website is de tool om van Velopark.be naar OpenStreetMap te gaan en hun data te importeren.

Hoe te gebruiken? Dat is het! Bedankt om mee te helpen!" }, + "shortDescription": { + "en": "A tool to import data from velopark.be into OpenStreetMap", + "nl": "Een hulpmiddel om data van velopark.be in OpenStreetMap in te laden" + }, "descriptionTail": { "*": "

Maintainer tools

" }, - "hideFromOverview": true, "icon": "./assets/themes/velopark/velopark.svg", - "mustHaveLanguage": [ - "nl" - ], - "lockLocation": [ - [ - 2.51357303225, - 49.5294835476 - ], - [ - 6.15665815596, - 51.4750237087 - ] - ], + "startZoom": 18, "startLat": 51.03753, "startLon": 3.71025, - "startZoom": 18, "defaultBackgroundId": "photo", - "enableNoteImports": false, + "hideFromOverview": true, "layers": [ { "id": "velopark_maproulette", "description": "Maproulette challenge containing velopark data", "source": { "osmTags": "mr_taskId~*", - "geoJson": "https://maproulette.org/api/v2/challenge/view/43282", - "isOsmCache": false + "geoJson": "https://maproulette.org/api/v2/challenge/view/43282" }, "title": { "render": "Velopark parking {mr_velopark_id}" @@ -348,5 +336,16 @@ } } ] - } + }, + "lockLocation": [ + [ + 2.51357303225, + 49.5294835476 + ], + [ + 6.15665815596, + 51.4750237087 + ] + ], + "enableNoteImports": false } diff --git a/assets/themes/waste_assen/waste_assen.json b/assets/themes/waste_assen/waste_assen.json index 51af77ecd5..2983968def 100644 --- a/assets/themes/waste_assen/waste_assen.json +++ b/assets/themes/waste_assen/waste_assen.json @@ -27,8 +27,7 @@ "description": "Laag op basis van externe data", "source": { "osmTags": "OBJECTID~*", - "geoJson": "https://opendata.arcgis.com/datasets/5b6953ac5a9d4616a7dc75ab0beeac2f_0.geojson", - "isOsmCache": false + "geoJson": "https://opendata.arcgis.com/datasets/5b6953ac5a9d4616a7dc75ab0beeac2f_0.geojson" }, "calculatedTags": [ "_closest_osm_waste_basket=closest(feat)('waste_basket')?.properties?.id", @@ -71,8 +70,7 @@ "description": "Laag op basis van externe data", "source": { "osmTags": "OBJECTID~*", - "geoJson": "https://opendata.arcgis.com/datasets/edb893998e27461b8ed82aad9854d27d_0.geojson", - "isOsmCache": false + "geoJson": "https://opendata.arcgis.com/datasets/edb893998e27461b8ed82aad9854d27d_0.geojson" }, "calculatedTags": [ "_closest_osm_recycling=closest(feat)('recycling')?.properties?.id", diff --git a/assets/themes/width/width.json b/assets/themes/width/width.json index 0e0f29a709..b8598267d4 100644 --- a/assets/themes/width/width.json +++ b/assets/themes/width/width.json @@ -275,6 +275,5 @@ "enableLayers": false, "enableSearch": false, "enableBackgroundLayerSelection": false, - "widenFactor": 0.05, - "clustering": false + "widenFactor": 0.05 } diff --git a/src/Logic/FeatureSource/Sources/LayoutSource.ts b/src/Logic/FeatureSource/Sources/LayoutSource.ts index dcb19e089f..72f90d7723 100644 --- a/src/Logic/FeatureSource/Sources/LayoutSource.ts +++ b/src/Logic/FeatureSource/Sources/LayoutSource.ts @@ -26,6 +26,8 @@ export default class LayoutSource extends FeatureSourceMerger { private readonly supportsForceDownload: UpdatableFeatureSource[] + private readonly fromCache: Map + private static readonly fromCacheZoomLevel = 15 constructor( layers: LayerConfig[], featureSwitches: FeatureSwitchState, @@ -43,13 +45,21 @@ export default class LayoutSource extends FeatureSourceMerger { const geojsonlayers = layers.filter((layer) => layer.source.geojsonSource !== undefined) const osmLayers = layers.filter((layer) => layer.source.geojsonSource === undefined) - const fromCache = osmLayers.map( - (l) => - new LocalStorageFeatureSource(backend, l, 15, mapProperties, { - isActive: isDisplayed(l.id), - maxAge: l.maxAgeOfCache, - }) - ) + const fromCache = new Map() + for (const layer of osmLayers) { + const src = new LocalStorageFeatureSource( + backend, + layer, + LayoutSource.fromCacheZoomLevel, + mapProperties, + { + isActive: isDisplayed(layer.id), + maxAge: layer.maxAgeOfCache, + } + ) + fromCache.set(layer.id, src) + } + const mvtSources: UpdatableFeatureSource[] = osmLayers .filter((f) => mvtAvailableLayers.has(f.id)) .map((l) => LayoutSource.setupMvtSource(l, mapProperties, isDisplayed(l.id))) @@ -92,9 +102,10 @@ export default class LayoutSource extends FeatureSourceMerger { LayoutSource.setupGeojsonSource(l, mapProperties, isDisplayed(l.id)) ) - super(...geojsonSources, ...fromCache, ...mvtSources, ...nonMvtSources) + super(...geojsonSources, ...Array.from(fromCache.values()), ...mvtSources, ...nonMvtSources) this.isLoading = isLoading + this.fromCache = fromCache supportsForceDownload.push(...geojsonSources) supportsForceDownload.push(...mvtSources) // Non-mvt sources are handled by overpass this.supportsForceDownload = supportsForceDownload diff --git a/src/Models/ThemeConfig/Conversion/CreateNoteImportLayer.ts b/src/Models/ThemeConfig/Conversion/CreateNoteImportLayer.ts index 05c95e6188..9a8d59cb23 100644 --- a/src/Models/ThemeConfig/Conversion/CreateNoteImportLayer.ts +++ b/src/Models/ThemeConfig/Conversion/CreateNoteImportLayer.ts @@ -92,7 +92,6 @@ export default class CreateNoteImportLayer extends Conversion { name: "All OSM-buildings", source: { osmTags: "building~*", - maxCacheAge: 0, }, calculatedTags: ["_surface:strict:=feat.get('_surface')"], lineRendering: [ @@ -269,7 +268,6 @@ describe("ReplaceGeometryAction", () => { "https://betadata.grbosm.site/grb?bbox={x_min},{y_min},{x_max},{y_max}", geoJsonZoomLevel: 18, mercatorCrs: true, - maxCacheAge: 0, }, name: "GRB geometries", title: "GRB outline",