From 438bedbfa16b1337b47687439f61cab55a2e58f6 Mon Sep 17 00:00:00 2001 From: Andrews Leruth Date: Thu, 7 Jul 2022 16:08:54 +0200 Subject: [PATCH 01/15] added filters --- assets/layers/pharmacy/pharmacy.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/assets/layers/pharmacy/pharmacy.json b/assets/layers/pharmacy/pharmacy.json index 662e2572a5..f824791429 100644 --- a/assets/layers/pharmacy/pharmacy.json +++ b/assets/layers/pharmacy/pharmacy.json @@ -84,6 +84,30 @@ ] } ], + "filter": [ + { + "id": "drive-through", + "options": [ + { + "question": { + "en": "Has drive through" + }, + "osmTags": "drive_through=yes" + } + ] + }, + { + "id": "dispensing", + "options": [ + { + "question": { + "en": "Pharmacy able to provide prescription drugs" + }, + "osmTags": "dispensing=yes" + } + ] + } + ], "mapRendering": [ { "icon": { From c33ca35029882fe016190bfaadcfb4ca0e79441b Mon Sep 17 00:00:00 2001 From: AlexanderRebai Date: Tue, 12 Jul 2022 13:02:49 +0000 Subject: [PATCH 02/15] added an indoors layer + theme --- assets/layers/doctors/doctors.json | 280 +++++++++--------- assets/layers/indoors/indoors.json | 66 +++++ assets/themes/indoors/crest.svg | 11 + assets/themes/indoors/indoors.json | 20 ++ assets/themes/indoors/license_info.json | 10 + .../mapcomplete-changes.json | 4 + assets/themes/onwheels/onwheels.json | 12 +- 7 files changed, 257 insertions(+), 146 deletions(-) create mode 100644 assets/layers/indoors/indoors.json create mode 100644 assets/themes/indoors/crest.svg create mode 100644 assets/themes/indoors/indoors.json create mode 100644 assets/themes/indoors/license_info.json diff --git a/assets/layers/doctors/doctors.json b/assets/layers/doctors/doctors.json index 236d13c542..ae0ca1a4a3 100644 --- a/assets/layers/doctors/doctors.json +++ b/assets/layers/doctors/doctors.json @@ -1,144 +1,144 @@ { - "id": "doctors", - "name": { - "en": "doctors" + "id": "doctors", + "name": { + "en": "doctors" + }, + "source": { + "osmTags": { + "or": [ + "amenity=doctors", + "amenity=dentist", + "healthcare=physiotherapist" + ] + } + }, + "title": { + "render": { + "en": "Doctors Office {name}" }, - "source": { - "osmTags": { - "or": [ - "amenity=doctors", - "amenity=dentist", - "healthcare=physiotherapist" - ] - } - }, - "title": { - "render": { - "en": "Doctors Office {name}" - }, - "mappings": [ - { - "if": "amenity=doctors", - "then": "Doctors Office {name}" - }, - { - "if": "amenity=dentist", - "then": "Dentists office {name}" - }, - { - "if": "healthcare=physiotherapist", - "then": "Physiotherapists office {name}" - } - ] - }, - "minzoom": 13, - "tagRenderings": [ - "images", - "opening_hours", - "phone", - "email", - "website", - { - "question": { - "en": "What is the name of this doctors place?" - }, - "render": { - "en": "This doctors place is called {name}" - }, - "freeform": { - "key": "name" - }, - "id": "name" - }, - { - "condition": "amenity=doctors", - "id": "specialty", - "render": { - "en": "This doctor is specialized in {healthcare:speciality}" - }, - "question": { - "en": "What is this doctor specialized in?" - }, - "freeform": { - "key": "healthcare:speciality" - }, - "mappings": [ - { - "if": "healthcare:speciality=general", - "then": { - "en": "This is a general practitioner" - } - }, - { - "if": "healthcare:speciality=gynaecology", - "then": { - "en": "This is a gynaecologist" - } - }, - { - "if": "healthcare:speciality=psychiatry", - "then": { - "en": "This is a psychiatrist" - } - }, - { - "if": "healthcare:speciality=paediatrics", - "then": { - "en": "This is a paediatrician" - } - } - ] - } - ], - "presets": [ - { - "title": { - "en": "a doctors office" - }, - "tags": [ - "amenity=doctors" - ] - }, - { - "title": { - "en": "a dentists office" - }, - "tags": [ - "amenity=dentist" - ] - }, - { - "title": { - "en": "a physiotherapists office" - }, - "tags": [ - "healthcare=physiotherapist" - ] - } - ], - "filter": [ - { - "id": "opened-now", - "options": [ - { - "question": { - "en": "Opened now" - }, - "osmTags": "_isOpen=yes" - } - ] - } - ], - "mapRendering": [ - { - "icon": { - "render": "circle:white;./assets/layers/doctors/doctors.svg" - }, - "iconSize": "40,40,center", - "location": [ - "point", - "centroid" - ] - } + "mappings": [ + { + "if": "amenity=doctors", + "then": "Doctors Office {name}" + }, + { + "if": "amenity=dentist", + "then": "Dentists office {name}" + }, + { + "if": "healthcare=physiotherapist", + "then": "Physiotherapists office {name}" + } ] + }, + "minzoom": 13, + "tagRenderings": [ + "images", + "opening_hours", + "phone", + "email", + "website", + { + "question": { + "en": "What is the name of this doctors place?" + }, + "render": { + "en": "This doctors place is called {name}" + }, + "freeform": { + "key": "name" + }, + "id": "name" + }, + { + "condition": "amenity=doctors", + "id": "specialty", + "render": { + "en": "This doctor is specialized in {healthcare:speciality}" + }, + "question": { + "en": "What is this doctor specialized in?" + }, + "freeform": { + "key": "healthcare:speciality" + }, + "mappings": [ + { + "if": "healthcare:speciality=general", + "then": { + "en": "This is a general practitioner" + } + }, + { + "if": "healthcare:speciality=gynaecology", + "then": { + "en": "This is a gynaecologist" + } + }, + { + "if": "healthcare:speciality=psychiatry", + "then": { + "en": "This is a psychiatrist" + } + }, + { + "if": "healthcare:speciality=paediatrics", + "then": { + "en": "This is a paediatrician" + } + } + ] + } + ], + "presets": [ + { + "title": { + "en": "a doctors office" + }, + "tags": [ + "amenity=doctors" + ] + }, + { + "title": { + "en": "a dentists office" + }, + "tags": [ + "amenity=dentist" + ] + }, + { + "title": { + "en": "a physiotherapists office" + }, + "tags": [ + "healthcare=physiotherapist" + ] + } + ], + "filter": [ + { + "id": "opened-now", + "options": [ + { + "question": { + "en": "Opened now" + }, + "osmTags": "_isOpen=yes" + } + ] + } + ], + "mapRendering": [ + { + "icon": { + "render": "circle:white;./assets/layers/doctors/doctors.svg" + }, + "iconSize": "40,40,center", + "location": [ + "point", + "centroid" + ] + } + ] } \ No newline at end of file diff --git a/assets/layers/indoors/indoors.json b/assets/layers/indoors/indoors.json new file mode 100644 index 0000000000..d69ab2aa32 --- /dev/null +++ b/assets/layers/indoors/indoors.json @@ -0,0 +1,66 @@ +{ + "id": "indoors", + "name": { + "en": "indoors" + }, + "source": { + "osmTags": { + "or": [ + "indoor=room", + "indoor=area", + "indoor=wall", + "indoor=corridor", + "indoor=door", + "indoor=level" + ] + } + }, + "title": { + "render": { + "en": "Indoor area" + }, + "mappings": [ + { + "if": "indoor=room", + "then": "Indoor Room" + }, + { + "if": "indoor=area", + "then": "Indoor Area" + }, + { + "if": "indoor=wall", + "then": "Indoor Wall" + }, + { + "if": "indoor=corridor", + "then": "Indoor Corridor" + }, + { + "if": "indoor=door", + "then": "Indoor Door" + }, + { + "if": "indoor=level", + "then": "Indoor Level" + } + ] + }, + "minzoom": 13, + "tagRenderings": [ + "images" + ], + "mapRendering": [ + { + "color": { + "render": "red" + }, + "width": { + "render": "4" + }, + "offset": { + "render": "-8" + } + } + ] +} \ No newline at end of file diff --git a/assets/themes/indoors/crest.svg b/assets/themes/indoors/crest.svg new file mode 100644 index 0000000000..383b543b1e --- /dev/null +++ b/assets/themes/indoors/crest.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/assets/themes/indoors/indoors.json b/assets/themes/indoors/indoors.json new file mode 100644 index 0000000000..b92548a7b7 --- /dev/null +++ b/assets/themes/indoors/indoors.json @@ -0,0 +1,20 @@ +{ + "id": "indoors", + "title": { + "en": "Indoors" + }, + "description": { + "en": "On this map, publicly accessible indoor places are shown" + }, + "maintainer": "MapComplete", + "icon": "./assets/themes/onwheels/crest.svg", + "version": "0", + "startLat": 51.17181, + "defaultBackgroundId": "CartoDB.Voyager", + "startLon": 4.144383, + "startZoom": 16, + "widenFactor": 2, + "layers": [ + "indoors" + ] +} \ No newline at end of file diff --git a/assets/themes/indoors/license_info.json b/assets/themes/indoors/license_info.json new file mode 100644 index 0000000000..9f2dcf81aa --- /dev/null +++ b/assets/themes/indoors/license_info.json @@ -0,0 +1,10 @@ +[ + { + "path": "crest.svg", + "license": "CC0", + "authors": [ + "Free Wheelies" + ], + "sources": [] + } +] \ No newline at end of file diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.json index db1b9bd236..b873d9ca22 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -211,6 +211,10 @@ "if": "theme=healthcare", "then": "./assets/layers/doctors/doctors.svg" }, + { + "if": "theme=indoors", + "then": "./assets/themes/onwheels/crest.svg" + }, { "if": "theme=kerbs_and_crossings", "then": "./assets/layers/kerbs/KerbIcon.svg" diff --git a/assets/themes/onwheels/onwheels.json b/assets/themes/onwheels/onwheels.json index 822a75349c..cedbbe94ec 100644 --- a/assets/themes/onwheels/onwheels.json +++ b/assets/themes/onwheels/onwheels.json @@ -1,10 +1,10 @@ { "id": "onwheels", "title": { - "en": "OnWheels" + "en": "OnWheels" }, "description": { - "en": "On this map, publicly weelchair accessible places are shown and can be easily added" + "en": "On this map, publicly weelchair accessible places are shown and can be easily added" }, "maintainer": "MapComplete", "icon": "./assets/themes/onwheels/crest.svg", @@ -29,11 +29,11 @@ "viewpoint", "doctors" ], - "overrideAll" : { - "minZoom" : "15", - "mapRendering" : [ + "overrideAll": { + "minZoom": "15", + "mapRendering": [ { - "label" : null + "label": null } ] } From f5f4d7bdcbcade2a4443f6284f1c4501c9e9fc2e Mon Sep 17 00:00:00 2001 From: AlexanderRebai Date: Wed, 13 Jul 2022 08:53:55 +0000 Subject: [PATCH 03/15] indoors layers added, labels added --- assets/layers/indoors/indoors.json | 38 +++++++++++++++++++++--------- assets/themes/indoors/indoors.json | 2 +- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/assets/layers/indoors/indoors.json b/assets/layers/indoors/indoors.json index d69ab2aa32..74773da9d4 100644 --- a/assets/layers/indoors/indoors.json +++ b/assets/layers/indoors/indoors.json @@ -17,32 +17,32 @@ }, "title": { "render": { - "en": "Indoor area" + "en": "Indoor area {name}" }, "mappings": [ { "if": "indoor=room", - "then": "Indoor Room" + "then": "Indoor Room {name}" }, { "if": "indoor=area", - "then": "Indoor Area" + "then": "Indoor Area {name}" }, { "if": "indoor=wall", - "then": "Indoor Wall" + "then": "Indoor Wall {name}" }, { "if": "indoor=corridor", - "then": "Indoor Corridor" + "then": "Indoor Corridor {name}" }, { "if": "indoor=door", - "then": "Indoor Door" + "then": "Indoor Door {name}" }, { "if": "indoor=level", - "then": "Indoor Level" + "then": "Indoor Level {name}" } ] }, @@ -53,14 +53,30 @@ "mapRendering": [ { "color": { - "render": "red" + "render": "#bb004488" }, "width": { - "render": "4" + "render": "8" }, "offset": { - "render": "-8" - } + "render": "-4" + }, + "fill": "no" + }, + { + "color": "red", + "fill": "no", + "width": "2" + }, + { + "label": { + "render": "
{name}
", + "condition": "name~*" + }, + "location": [ + "point", + "centroid" + ] } ] } \ No newline at end of file diff --git a/assets/themes/indoors/indoors.json b/assets/themes/indoors/indoors.json index b92548a7b7..c8964878e2 100644 --- a/assets/themes/indoors/indoors.json +++ b/assets/themes/indoors/indoors.json @@ -12,7 +12,7 @@ "startLat": 51.17181, "defaultBackgroundId": "CartoDB.Voyager", "startLon": 4.144383, - "startZoom": 16, + "startZoom": 14, "widenFactor": 2, "layers": [ "indoors" From 2c51c8254101fc41a9a2f2b1823eb3fcbedfe8ba Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Mon, 18 Jul 2022 10:45:54 +0200 Subject: [PATCH 04/15] Remove 'corridor' from the indoor theme --- assets/layers/indoors/indoors.json | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/layers/indoors/indoors.json b/assets/layers/indoors/indoors.json index 74773da9d4..1c14a47e8f 100644 --- a/assets/layers/indoors/indoors.json +++ b/assets/layers/indoors/indoors.json @@ -9,7 +9,6 @@ "indoor=room", "indoor=area", "indoor=wall", - "indoor=corridor", "indoor=door", "indoor=level" ] From 0ea3239933228512e63c047930bbce72381624aa Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Mon, 18 Jul 2022 16:23:18 +0200 Subject: [PATCH 05/15] Remove unresolved merge conflict --- assets/themes/onwheels/onwheels.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/assets/themes/onwheels/onwheels.json b/assets/themes/onwheels/onwheels.json index 483ae4ee39..2994e849b3 100644 --- a/assets/themes/onwheels/onwheels.json +++ b/assets/themes/onwheels/onwheels.json @@ -32,11 +32,6 @@ "walls_and_buildings" ], "overrideAll": { -<<<<<<< HEAD - "minZoom": "15", - "mapRendering": [ - { -======= "+calculatedTags": [ "_poi_walls_and_buildings_entrance_properties=feat.closestn('walls_and_buildings', 1, undefined, 1000).map(w => ({id: w.feat.properties.id, width: w.feat.properties['_entrance:width']}))[0]", "_poi_entrance:width=JSON.parse(feat.properties._poi_walls_and_buildings_entrance_properties)?.width" @@ -68,7 +63,6 @@ "minzoom": "15", "mapRendering": [ { ->>>>>>> develop "label": null } ] From 39d5ca424fd8c7c2eb4da90d019b3dacd105a07c Mon Sep 17 00:00:00 2001 From: Andrews Leruth Date: Tue, 19 Jul 2022 08:36:41 +0200 Subject: [PATCH 06/15] added kerb type and height question for entrance --- assets/layers/entrance/entrance.json | 90 ++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/assets/layers/entrance/entrance.json b/assets/layers/entrance/entrance.json index c5df0bb8d3..efb9a8400b 100644 --- a/assets/layers/entrance/entrance.json +++ b/assets/layers/entrance/entrance.json @@ -340,6 +340,96 @@ "key": "width", "type": "distance" } + }, + { + "id": "kerb-type", + "question": { + "en": "What is the height of this kerb?", + "nl": "Hoe hoog is deze stoeprand?", + "de": "Wie hoch ist der Bordstein?" + }, + "mappings": [ + { + "if": "kerb=raised", + "then": { + "en": "This kerb is raised (>3 cm)", + "nl": "Deze stoeprand is hoog (>3 cm)", + "de": "Der Bordstein ist erhöht (>3 cm)" + }, + "icon": { + "path": "./assets/layers/kerbs/raised.svg", + "class": "small" + } + }, + { + "if": "kerb=lowered", + "then": { + "en": "This kerb is lowered (~3 cm)", + "nl": "Deze stoeprand is verlaagd (~3 cm)", + "de": "Der Bordstein ist abgesenkt (~3 cm)" + }, + "icon": { + "path": "./assets/layers/kerbs/lowered.svg", + "class": "small" + } + }, + { + "if": "kerb=flush", + "then": { + "en": "This kerb is flush (~0cm)", + "nl": "Deze stoeprand is vlak (~0cm)", + "de": "Der Bordstein ist bündig (~0cm)" + }, + "icon": { + "path": "./assets/layers/kerbs/flush.svg", + "class": "small" + } + }, + { + "if": "kerb=no", + "then": { + "en": "There is no kerb here", + "nl": "Er is hier geen stoeprand", + "de": "Hier gibt es keinen Bordstein" + }, + "hideInAnswer": true, + "icon": { + "path": "./assets/layers/kerbs/no.svg", + "class": "small" + } + }, + { + "if": "kerb=yes", + "then": { + "en": "There is a kerb of unknown height", + "nl": "Er is een stoeprand met onbekende hoogte", + "de": "Es gibt einen Bordstein mit unbekannter Höhe" + }, + "hideInAnswer": true + } + ] + }, + { + "id": "kerb-height", + "question": { + "en": "What is the height of this kerb?", + "nl": "Hoe hoog is deze stoeprand?", + "de": "Wie hoch ist der Bordstein?" + }, + "render": { + "en": "Kerb height: {kerb:height}", + "nl": "Stoeprandhoogte: {kerb:height}", + "de": "Bordsteinhöhe: {kerb:height}" + }, + "freeform": { + "key": "kerb:height", + "placeholder": { + "en": "Height of the kerb", + "nl": "Hoogte van de stoeprand", + "de": "Höhe des Bordsteins" + }, + "type": "pnat" + } } ], "mapRendering": [ From 47b50e2b943836d9afa59cca31278e0d9a91b657 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Tue, 19 Jul 2022 09:24:00 +0200 Subject: [PATCH 07/15] Fix typo --- assets/layers/pharmacy/pharmacy.json | 2 +- .../mapcomplete-changes.json | 55 +++++-------------- 2 files changed, 15 insertions(+), 42 deletions(-) diff --git a/assets/layers/pharmacy/pharmacy.json b/assets/layers/pharmacy/pharmacy.json index 457ddd201c..4f440aac0d 100644 --- a/assets/layers/pharmacy/pharmacy.json +++ b/assets/layers/pharmacy/pharmacy.json @@ -92,5 +92,5 @@ } ] } - ], + ] } \ No newline at end of file diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.json index b3a54ccf0e..7b3690cb79 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -1,19 +1,13 @@ { "id": "mapcomplete-changes", "title": { - "en": "Changes made with MapComplete", - "de": "Mit MapComplete vorgenommene Änderungen", - "nl": "Wijzigingen gemaakt met MapComplete" + "en": "Changes made with MapComplete" }, "shortDescription": { - "en": "Shows changes made by MapComplete", - "de": "Zeigt die mit MapComplete vorgenommenen Änderungen", - "nl": "Toont wijzigingen gemaakt met MapComplete" + "en": "Shows changes made by MapComplete" }, "description": { - "en": "This maps shows all the changes made with MapComplete", - "de": "Diese Karte zeigt alle mit MapComplete vorgenommenen Änderungen", - "nl": "Deze kaart toont alle wijzigingen die met MapComplete werden gemaakt" + "en": "This maps shows all the changes made with MapComplete" }, "maintainer": "", "icon": "./assets/svg/logo.svg", @@ -28,8 +22,7 @@ { "id": "mapcomplete-changes", "name": { - "en": "Changeset centers", - "de": "Zentrum der Änderungssätze" + "en": "Changeset centers" }, "minzoom": 0, "source": { @@ -43,47 +36,35 @@ ], "title": { "render": { - "en": "Changeset for {theme}", - "de": "Änderungssatz für {theme}", - "nl": "Wijzigingset voor {theme}" + "en": "Changeset for {theme}" } }, "description": { - "en": "Shows all MapComplete changes", - "de": "Zeigt alle MapComplete Änderungen", - "nl": "Toont alle wijzigingen met MapComplete" + "en": "Shows all MapComplete changes" }, "tagRenderings": [ { "id": "render_id", "render": { - "en": "Changeset {id}", - "de": "Änderungssatz {id}", - "nl": "Wijzigingset {id}" + "en": "Changeset {id}" } }, { "id": "contributor", "render": { - "en": "Change made by {_last_edit:contributor}", - "de": "Geändert von {_last_edit:contributor}", - "nl": "Wijziging gemaakt door {_last_edit:contributor}" + "en": "Change made by {_last_edit:contributor}" } }, { "id": "theme", "render": { - "en": "Change with theme {theme}", - "de": "Änderung mit Thema {theme}", - "nl": "Wijziging met thema {theme}" + "en": "Change with theme {theme}" }, "mappings": [ { "if": "theme~http.*", "then": { - "en": "Change with unofficial theme {theme}", - "de": "Änderung mit inoffiziellem Thema {theme}", - "nl": "Wijziging met officieus thema {theme}" + "en": "Change with unofficial theme {theme}" } } ] @@ -387,9 +368,7 @@ } ], "question": { - "en": "Themename contains {search}", - "de": "Themenname enthält {search}", - "nl": "Themanaam bevat {search}" + "en": "Themename contains {search}" } } ] @@ -405,9 +384,7 @@ } ], "question": { - "en": "Made by contributor {search}", - "de": "Erstellt von {search}", - "nl": "Gemaakt door bijdrager {search}" + "en": "Made by contributor {search}" } } ] @@ -423,9 +400,7 @@ } ], "question": { - "en": "Not made by contributor {search}", - "de": "Nicht erstellt von {search}", - "nl": "Niet gemaakt door bijdrager {search}" + "en": "Not made by contributor {search}" } } ] @@ -440,9 +415,7 @@ { "id": "link_to_more", "render": { - "en": "More statistics can be found here", - "de": "Weitere Statistiken finden Sie hier", - "nl": "Meer statistieken kunnen hier gevonden worden" + "en": "More statistics can be found here" } }, { From 2611bd20523836c2c2e946fc191f9d9f79240fb9 Mon Sep 17 00:00:00 2001 From: Andrews Leruth Date: Tue, 19 Jul 2022 09:41:25 +0200 Subject: [PATCH 08/15] added calculated tags --- assets/layers/entrance/entrance.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/layers/entrance/entrance.json b/assets/layers/entrance/entrance.json index efb9a8400b..651d251c94 100644 --- a/assets/layers/entrance/entrance.json +++ b/assets/layers/entrance/entrance.json @@ -32,6 +32,9 @@ "es": "Entrada" } }, + "calculatedTags": [ + "" + ], "tagRenderings": [ "images", { From 1f5c594f348c507469885af38f34cbbe09ad8fec Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Tue, 19 Jul 2022 09:46:06 +0200 Subject: [PATCH 09/15] Don't emit an error if multiple overrides add to a list --- Models/ThemeConfig/Conversion/Validation.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Models/ThemeConfig/Conversion/Validation.ts b/Models/ThemeConfig/Conversion/Validation.ts index 22400569e6..bcc24c6b79 100644 --- a/Models/ThemeConfig/Conversion/Validation.ts +++ b/Models/ThemeConfig/Conversion/Validation.ts @@ -246,6 +246,10 @@ class OverrideShadowingCheck extends DesugaringStep { for (const layer of withOverride) { for (const key in overrideAll) { + if(key.endsWith("+") || key.startsWith("+")){ + // This key will _add_ to the list, not overwrite it - so no warning is needed + continue + } if (layer["override"][key] !== undefined || layer["override"]["=" + key] !== undefined) { const w = "The override of layer " + JSON.stringify(layer["builtin"]) + " has a shadowed property: " + key + " is overriden by overrideAll of the theme"; errors.push(w) From ce24fb5b8852a8c293c05dec7cc5dc21dce6867d Mon Sep 17 00:00:00 2001 From: Andrews Leruth Date: Tue, 19 Jul 2022 10:50:29 +0200 Subject: [PATCH 10/15] entrance now has kerb-height questions --- assets/layers/entrance/entrance.json | 77 ++----------------- .../walls_and_buildings.json | 2 +- 2 files changed, 8 insertions(+), 71 deletions(-) diff --git a/assets/layers/entrance/entrance.json b/assets/layers/entrance/entrance.json index 651d251c94..4f5a4dca31 100644 --- a/assets/layers/entrance/entrance.json +++ b/assets/layers/entrance/entrance.json @@ -33,7 +33,6 @@ } }, "calculatedTags": [ - "" ], "tagRenderings": [ "images", @@ -344,74 +343,6 @@ "type": "distance" } }, - { - "id": "kerb-type", - "question": { - "en": "What is the height of this kerb?", - "nl": "Hoe hoog is deze stoeprand?", - "de": "Wie hoch ist der Bordstein?" - }, - "mappings": [ - { - "if": "kerb=raised", - "then": { - "en": "This kerb is raised (>3 cm)", - "nl": "Deze stoeprand is hoog (>3 cm)", - "de": "Der Bordstein ist erhöht (>3 cm)" - }, - "icon": { - "path": "./assets/layers/kerbs/raised.svg", - "class": "small" - } - }, - { - "if": "kerb=lowered", - "then": { - "en": "This kerb is lowered (~3 cm)", - "nl": "Deze stoeprand is verlaagd (~3 cm)", - "de": "Der Bordstein ist abgesenkt (~3 cm)" - }, - "icon": { - "path": "./assets/layers/kerbs/lowered.svg", - "class": "small" - } - }, - { - "if": "kerb=flush", - "then": { - "en": "This kerb is flush (~0cm)", - "nl": "Deze stoeprand is vlak (~0cm)", - "de": "Der Bordstein ist bündig (~0cm)" - }, - "icon": { - "path": "./assets/layers/kerbs/flush.svg", - "class": "small" - } - }, - { - "if": "kerb=no", - "then": { - "en": "There is no kerb here", - "nl": "Er is hier geen stoeprand", - "de": "Hier gibt es keinen Bordstein" - }, - "hideInAnswer": true, - "icon": { - "path": "./assets/layers/kerbs/no.svg", - "class": "small" - } - }, - { - "if": "kerb=yes", - "then": { - "en": "There is a kerb of unknown height", - "nl": "Er is een stoeprand met onbekende hoogte", - "de": "Es gibt einen Bordstein mit unbekannter Höhe" - }, - "hideInAnswer": true - } - ] - }, { "id": "kerb-height", "question": { @@ -432,7 +363,13 @@ "de": "Höhe des Bordsteins" }, "type": "pnat" - } + }, + "mappings": [ + { + "if": "kerb-height=", + "then": "kerb-height=0" + } + ] } ], "mapRendering": [ diff --git a/assets/layers/walls_and_buildings/walls_and_buildings.json b/assets/layers/walls_and_buildings/walls_and_buildings.json index 133a2bf0f2..4ef1816e6a 100644 --- a/assets/layers/walls_and_buildings/walls_and_buildings.json +++ b/assets/layers/walls_and_buildings/walls_and_buildings.json @@ -47,7 +47,7 @@ "calculatedTags": [ "_entrance_properties=feat.overlapWith('entrance')?.map(e => e.feat.properties).filter(p => p !== undefined).filter(p => p.width !== undefined)", "_entrance:id=feat.get('_entrance_properties')?.map(e => e.id)?.at(0)", - "_entrance:width=feat.get('_entrance_properties')?.map(e => e.width)" + "_entrance:width=feat.get('_entrance_properties')?.map(e => e.width)?.at(0)" ], "tagRenderings": [ { From 665ece1d3e6bd531eeeecff658eac1c8da80f067 Mon Sep 17 00:00:00 2001 From: Andrews Leruth Date: Tue, 19 Jul 2022 10:56:07 +0200 Subject: [PATCH 11/15] removed calulatedTags --- assets/layers/entrance/entrance.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/assets/layers/entrance/entrance.json b/assets/layers/entrance/entrance.json index 4f5a4dca31..8683d4106c 100644 --- a/assets/layers/entrance/entrance.json +++ b/assets/layers/entrance/entrance.json @@ -32,8 +32,6 @@ "es": "Entrada" } }, - "calculatedTags": [ - ], "tagRenderings": [ "images", { From f4f845ae8f04959e5bce7f46e5457ec505d4a385 Mon Sep 17 00:00:00 2001 From: Andrews Leruth Date: Tue, 19 Jul 2022 11:53:16 +0200 Subject: [PATCH 12/15] fixed typo --- assets/themes/onwheels/onwheels.json | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/assets/themes/onwheels/onwheels.json b/assets/themes/onwheels/onwheels.json index 2994e849b3..d62f1e68b9 100644 --- a/assets/themes/onwheels/onwheels.json +++ b/assets/themes/onwheels/onwheels.json @@ -34,17 +34,23 @@ "overrideAll": { "+calculatedTags": [ "_poi_walls_and_buildings_entrance_properties=feat.closestn('walls_and_buildings', 1, undefined, 1000).map(w => ({id: w.feat.properties.id, width: w.feat.properties['_entrance:width']}))[0]", + "_poi_entrance:id=JSON.parce(feat.properties._poi_walls_and_buildings_entrance_properteis)?.id", "_poi_entrance:width=JSON.parse(feat.properties._poi_walls_and_buildings_entrance_properties)?.width" ], "+tagRenderings": [ { "id": "_poi_entrance:width", - "condition": "entrance=", + "condition": { + "and": [ + "entrance=", + "kerb=" + ] + }, "render": { - "en": "This door has a width of {canonical(_poi_entrance:width)} meter", - "nl": "Deze deur heeft een breedte van {canonical(_poi_entrance:width)} meter", - "de": "Diese Tür hat eine Durchgangsbreite von {canonical(_poi_entrance:width)} Meter", - "es": "Esta puerta tiene una ancho de {canonical(_poi_entrance:width)} metros" + "en": "This door has a width of {canonical(_poi_entrance:width)} meters", + "nl": "Deze deur heeft een breedte van {canonical(_poi_entrance:width)} meter", + "de": "Diese Tür hat eine Durchgangsbreite von {canonical(_poi_entrance:width)} Meter", + "es": "Esta puerta tiene una ancho de {canonical(_poi_entrance:width)} metros" }, "freeform": { "key": "_poi_entrance:width", From 034e3cf282da86859d55aeccd745ec8dfd77270a Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Tue, 19 Jul 2022 11:55:46 +0200 Subject: [PATCH 13/15] Add reception desk layers --- Models/ThemeConfig/Json/UnitConfigJson.ts | 4 +++- assets/tagRenderings/license_info.json | 20 ++++++++++++++++ assets/tagRenderings/questions.json | 28 +++++++++++++++++++++++ assets/themes/onwheels/onwheels.json | 1 + 4 files changed, 52 insertions(+), 1 deletion(-) diff --git a/Models/ThemeConfig/Json/UnitConfigJson.ts b/Models/ThemeConfig/Json/UnitConfigJson.ts index bde2683b23..f69212f000 100644 --- a/Models/ThemeConfig/Json/UnitConfigJson.ts +++ b/Models/ThemeConfig/Json/UnitConfigJson.ts @@ -1,7 +1,9 @@ export default interface UnitConfigJson { /** - * Every key from this list will be normalized + * Every key from this list will be normalized. + * + * To render a united value properly, use */ appliesToKey: string[], /** diff --git a/assets/tagRenderings/license_info.json b/assets/tagRenderings/license_info.json index c65bd6f938..1f92135a1c 100644 --- a/assets/tagRenderings/license_info.json +++ b/assets/tagRenderings/license_info.json @@ -1,4 +1,24 @@ [ + { + "path": "audio_induction_loop.svg", + "license": "CC-BY 4.0", + "authors": [ + "Carl Holderness" + ], + "sources": [ + "https://commons.wikimedia.org/wiki/File:Noun_telecoil_audio_induction_hearing_loop_symbol_2011213.svg" + ] + }, + { + "path": "audio_induction_loop_missing.svg", + "license": "CC-BY 4.0", + "authors": [ + "Carl Holderness" + ], + "sources": [ + "https://commons.wikimedia.org/wiki/File:Noun_telecoil_audio_induction_hearing_loop_symbol_2011213.svg" + ] + }, { "path": "cash.svg", "license": "CC-BY 3.0", diff --git a/assets/tagRenderings/questions.json b/assets/tagRenderings/questions.json index aeafac6f44..ec5ee874af 100644 --- a/assets/tagRenderings/questions.json +++ b/assets/tagRenderings/questions.json @@ -1086,5 +1086,33 @@ } } ] + }, + "induction-loop": { + "description": "An accessibility feature: induction loops are for hard-hearing persons which have an FM-receiver.", + "question": { + "en": "Does this place have an audio induction loop for people with reduced hearing?" + }, + "mappings": [ + { + "if": "hearing_loop=yes", + "then": { + "en": "This place has an audio induction loop" + }, + "icon": { + "path": "./assets/tagRenderings/audio_induction_loop.svg", + "class": "medium" + } + }, + { + "if": "hearing_loop=no", + "then": { + "en": "This place does not has an audio induction loop" + }, + "icon": { + "path": "./assets/tagRenderings/audio_induction_loop_missing.svg", + "class": "medium" + } + } + ] } } \ No newline at end of file diff --git a/assets/themes/onwheels/onwheels.json b/assets/themes/onwheels/onwheels.json index 2994e849b3..7093afb065 100644 --- a/assets/themes/onwheels/onwheels.json +++ b/assets/themes/onwheels/onwheels.json @@ -29,6 +29,7 @@ "toilet", "viewpoint", "doctors", + "reception_desk", "walls_and_buildings" ], "overrideAll": { From 30c1ed94c5ceaaac11d5dfdcca1d25c7796beebf Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Tue, 19 Jul 2022 11:57:48 +0200 Subject: [PATCH 14/15] Add missing icons, actually add reception desk layer --- .../layers/reception_desk/license_info.json | 12 +++ .../layers/reception_desk/reception_desk.json | 79 +++++++++++++++++++ .../layers/reception_desk/reception_desk.svg | 29 +++++++ assets/tagRenderings/audio_induction_loop.svg | 44 +++++++++++ .../audio_induction_loop_missing.svg | 53 +++++++++++++ 5 files changed, 217 insertions(+) create mode 100644 assets/layers/reception_desk/license_info.json create mode 100644 assets/layers/reception_desk/reception_desk.json create mode 100644 assets/layers/reception_desk/reception_desk.svg create mode 100644 assets/tagRenderings/audio_induction_loop.svg create mode 100644 assets/tagRenderings/audio_induction_loop_missing.svg diff --git a/assets/layers/reception_desk/license_info.json b/assets/layers/reception_desk/license_info.json new file mode 100644 index 0000000000..5afdc20e73 --- /dev/null +++ b/assets/layers/reception_desk/license_info.json @@ -0,0 +1,12 @@ +[ + { + "path": "reception_desk.svg", + "license": "CC-BY-SA", + "authors": [ + "Robin Julien" + ], + "sources": [ + "https://www.ctsteward.com/" + ] + } +] \ No newline at end of file diff --git a/assets/layers/reception_desk/reception_desk.json b/assets/layers/reception_desk/reception_desk.json new file mode 100644 index 0000000000..a9d3228c24 --- /dev/null +++ b/assets/layers/reception_desk/reception_desk.json @@ -0,0 +1,79 @@ +{ + "id": "reception_desk", + "name": { + "en": "Reception desks" + }, + "title": { + "render": { + "en": "Reception desk" + } + }, + "source": { + "osmTags": "amenity=reception_desk" + }, + "mapRendering": [ + { + "location": [ + "point", + "centroid" + ], + "icon": "circle:white;./assets/layers/reception_desk/reception_desk.svg", + "iconSize": "40,40,center" + } + ], + "tagRenderings": [ + "images", + { + "id": "desk-height", + "question": { + "en": "What is the height of the reception desk?
This is measured from the floor to the lowest usable part of the desk
" + }, + "render": { + "en": "The height of the desk is {canonical(desk:height)}" + }, + "freeform": { + "key": "desk:height", + "type": "pfloat" + } + }, + "induction-loop" + ], + "presets": [ + { + "tags": [ + "amenity=reception_desk" + ], + "title": { + "en": "a reception desk" + } + } + ], + "units": [ + { + "appliesToKey": [ + "desk:height" + ], + "applicableUnits": [ + { + "canonicalDenomination": "m", + "alternativeDenomination": [ + "meter" + ], + "human": { + "en": "meter" + } + }, + { + "canonicalDenomination": "cm", + "alternativeDenomination": [ + "centimeter", + "cms" + ], + "human": { + "en": "centimeter" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/assets/layers/reception_desk/reception_desk.svg b/assets/layers/reception_desk/reception_desk.svg new file mode 100644 index 0000000000..e8dd150704 --- /dev/null +++ b/assets/layers/reception_desk/reception_desk.svg @@ -0,0 +1,29 @@ + + + + + + + + + + diff --git a/assets/tagRenderings/audio_induction_loop.svg b/assets/tagRenderings/audio_induction_loop.svg new file mode 100644 index 0000000000..b56e877be2 --- /dev/null +++ b/assets/tagRenderings/audio_induction_loop.svg @@ -0,0 +1,44 @@ + + diff --git a/assets/tagRenderings/audio_induction_loop_missing.svg b/assets/tagRenderings/audio_induction_loop_missing.svg new file mode 100644 index 0000000000..b35a316069 --- /dev/null +++ b/assets/tagRenderings/audio_induction_loop_missing.svg @@ -0,0 +1,53 @@ + + From cb1e436b69ef4a182aa6b492104dd5cf1c2c9bcd Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Tue, 19 Jul 2022 12:06:57 +0200 Subject: [PATCH 15/15] Small fixes to the entrances --- assets/layers/entrance/entrance.json | 45 +++++++++++++++++++++------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/assets/layers/entrance/entrance.json b/assets/layers/entrance/entrance.json index 8683d4106c..0533936342 100644 --- a/assets/layers/entrance/entrance.json +++ b/assets/layers/entrance/entrance.json @@ -344,28 +344,25 @@ { "id": "kerb-height", "question": { - "en": "What is the height of this kerb?", - "nl": "Hoe hoog is deze stoeprand?", - "de": "Wie hoch ist der Bordstein?" + "en": "What is the height of this kerb?" }, "render": { - "en": "Kerb height: {kerb:height}", - "nl": "Stoeprandhoogte: {kerb:height}", - "de": "Bordsteinhöhe: {kerb:height}" + "en": "The kerb height of this door is {kerb:height}" }, "freeform": { "key": "kerb:height", "placeholder": { - "en": "Height of the kerb", - "nl": "Hoogte van de stoeprand", - "de": "Höhe des Bordsteins" + "en": "Height of the door kerb" }, "type": "pnat" }, "mappings": [ { "if": "kerb-height=", - "then": "kerb-height=0" + "then": { + "en": "This door does not have a kerb", + "nl": "Deze deur heeft geen drempel" + } } ] } @@ -403,5 +400,33 @@ "entrance=yes" ] } + ], + "units": [ + { + "appliesToKey": [ + "kerb:height" + ], + "applicableUnits": [ + { + "canonicalDenomination": "m", + "alternativeDenomination": [ + "meter" + ], + "human": { + "en": "meter" + } + }, + { + "canonicalDenomination": "cm", + "alternativeDenomination": [ + "centimeter", + "cms" + ], + "human": { + "en": "centimeter" + } + } + ] + } ] } \ No newline at end of file