From c33ca35029882fe016190bfaadcfb4ca0e79441b Mon Sep 17 00:00:00 2001 From: AlexanderRebai Date: Tue, 12 Jul 2022 13:02:49 +0000 Subject: [PATCH 1/3] 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 236d13c54..ae0ca1a4a 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 000000000..d69ab2aa3 --- /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 000000000..383b543b1 --- /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 000000000..b92548a7b --- /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 000000000..9f2dcf81a --- /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 db1b9bd23..b873d9ca2 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 822a75349..cedbbe94e 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 2/3] 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 d69ab2aa3..74773da9d 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 b92548a7b..c8964878e 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 3/3] 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 74773da9d..1c14a47e8 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" ]