From d8d0fa685be31cdbfc7489e59ca5d965017d79e0 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Thu, 7 Jul 2022 23:27:36 +0200 Subject: [PATCH] Merge all healtcare layers into a map theme --- assets/layers/doctors/doctors.json | 6 +- assets/layers/doctors/license_info.json | 10 ++ assets/layers/hospital/hospital.svg | 13 +++ assets/layers/hospital/license_info.json | 12 +++ assets/pharmacy/license_info.json | 12 --- assets/pharmacy/pharmacy.json | 102 ------------------ assets/pharmacy/pharmacy.svg | 6 -- .../healthcare.json} | 10 +- .../mapcomplete-changes.json | 12 +-- assets/themes/pharmacies/pharmacies.json | 20 ---- assets/themes/shops/shops.json | 3 +- 11 files changed, 52 insertions(+), 154 deletions(-) create mode 100644 assets/layers/hospital/hospital.svg create mode 100644 assets/layers/hospital/license_info.json delete mode 100644 assets/pharmacy/license_info.json delete mode 100644 assets/pharmacy/pharmacy.json delete mode 100644 assets/pharmacy/pharmacy.svg rename assets/themes/{doctors/doctors.json => healthcare/healthcare.json} (63%) delete mode 100644 assets/themes/pharmacies/pharmacies.json diff --git a/assets/layers/doctors/doctors.json b/assets/layers/doctors/doctors.json index e69fb27a4..cb9b0a65c 100644 --- a/assets/layers/doctors/doctors.json +++ b/assets/layers/doctors/doctors.json @@ -120,7 +120,11 @@ "mapRendering": [ { "icon": { - "render": "circle:white;./assets/layers/doctors/doctors.svg" + "render": "circle:white;./assets/layers/doctors/doctors.svg", + "mappings": [{ + "if": "amenity=dentist", + "then": "circle:white;./assets/layers/doctors/dentist.svg" + }] }, "iconSize": "40,40,center", "location": [ diff --git a/assets/layers/doctors/license_info.json b/assets/layers/doctors/license_info.json index 90889fdc6..e47e39881 100644 --- a/assets/layers/doctors/license_info.json +++ b/assets/layers/doctors/license_info.json @@ -1,4 +1,14 @@ [ + { + "path": "dentist.svg", + "license": "cc0", + "authors": [ + "osmcarto" + ], + "sources": [ + "https://wiki.openstreetmap.org/wiki/File:Dentist-14.svg" + ] + }, { "path": "doctors.svg", "license": "cc0", diff --git a/assets/layers/hospital/hospital.svg b/assets/layers/hospital/hospital.svg new file mode 100644 index 000000000..5ef1a4b63 --- /dev/null +++ b/assets/layers/hospital/hospital.svg @@ -0,0 +1,13 @@ + + + + + + diff --git a/assets/layers/hospital/license_info.json b/assets/layers/hospital/license_info.json new file mode 100644 index 000000000..8a37d59ec --- /dev/null +++ b/assets/layers/hospital/license_info.json @@ -0,0 +1,12 @@ +[ + { + "path": "hospital.svg", + "license": "CC-0", + "authors": [ + "osmcarto" + ], + "sources": [ + "https://wiki.openstreetmap.org/wiki/File:Hospital-14.svg" + ] + } +] \ No newline at end of file diff --git a/assets/pharmacy/license_info.json b/assets/pharmacy/license_info.json deleted file mode 100644 index ec982334c..000000000 --- a/assets/pharmacy/license_info.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "path": "pharmacy.svg", - "license": "CC0", - "authors": [ - "OSM-carto" - ], - "sources": [ - "https://wiki.openstreetmap.org/wiki/File:Pharmacy-14.svg" - ] - } -] \ No newline at end of file diff --git a/assets/pharmacy/pharmacy.json b/assets/pharmacy/pharmacy.json deleted file mode 100644 index ae6e97470..000000000 --- a/assets/pharmacy/pharmacy.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "id": "pharmacies", - "name": { - "en": "pharmacies" - }, - "title": { - "render": { - "en": "{name}" - } - }, - "source": { - "osmTags": { - "and": [ - "amenity=pharmacy" - ], - "or": [ - "dispensing=yes" - ] - } - }, - "minzoom":13, - "tagRenderings": [ - "images", - "opening_hours", - "phone", - "email", - "website", - "dispensing", - { - "id": "wheelchair", - "render": { - "en": "Easily accessible for wheelchair users: {wheelchair}" - }, - "question": { - "en": "Is this pharmacy easy to access on a wheelchair?" - }, - "freeform": { - "key": "wheelchair" - }, - "mappings": [ - { - "if": "wheelchair=yes", - "then": { - "en": "Yes, this pharmacy is easy to access on a wheelchair" - } - }, - { - "if": "wheelchair=no", - "then": { - "en": "No, this pharmacy is easy to access on a wheelchair" - } - - }, - { - "if": "wheelchair=limited", - "then": { - "en": "This pharmacy has limited access for wheelchair users" - } - } - ] - }, - { - "id": "drive_through", - "render": { - "en": "Pharmacy drive through: {drive_through}" - }, - "question": { - "en": "Does this pharmacy have a drive through?" - }, - "freeform": { - "key": "drive_through" - }, - "mappings": [ - { - "if": "drive_through=yes", - "then": { - "en": "Yes, this pharmacy has a drive through" - } - }, - { - "if": "drive_through=no", - "then": { - "en": "No, this pharmacy does not have a drive through" - } - - } - ] - } - ], - "mapRendering": [ - { - "icon": { - "render": "" - }, - "iconSize": "40,40,bottom", - "location": [ - "point", - "centroid" - ] - } - ] -} \ No newline at end of file diff --git a/assets/pharmacy/pharmacy.svg b/assets/pharmacy/pharmacy.svg deleted file mode 100644 index 325d83789..000000000 --- a/assets/pharmacy/pharmacy.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/assets/themes/doctors/doctors.json b/assets/themes/healthcare/healthcare.json similarity index 63% rename from assets/themes/doctors/doctors.json rename to assets/themes/healthcare/healthcare.json index 7c191b571..b527c884a 100644 --- a/assets/themes/doctors/doctors.json +++ b/assets/themes/healthcare/healthcare.json @@ -1,10 +1,10 @@ { - "id": "doctors", + "id": "healthcare", "title": { - "en": "Doctors" + "en": "Healthcare" }, "description": { - "en": "On this map, publicly accessible doctors offices are shown and can be easily added" + "en": "On this map, various healthcare related items are shown" }, "maintainer": "MapComplete", "icon": "./assets/layers/doctors/doctors.svg", @@ -15,6 +15,8 @@ "startZoom": 16, "widenFactor": 2, "layers": [ - "doctors" + "doctors", + "hospital", + "pharmacy" ] } \ 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 07f22fdba..0ff2edd95 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -151,10 +151,6 @@ "if": "theme=cyclofix", "then": "./assets/themes/cyclofix/logo.svg" }, - { - "if": "theme=doctors", - "then": "./assets/layers/doctors/doctors.svg" - }, { "if": "theme=drinking_water", "then": "./assets/themes/drinking_water/logo.svg" @@ -211,6 +207,10 @@ "if": "theme=hailhydrant", "then": "./assets/themes/hailhydrant/logo.svg" }, + { + "if": "theme=healthcare", + "then": "./assets/layers/doctors/doctors.svg" + }, { "if": "theme=kerbs_and_crossings", "then": "./assets/layers/kerbs/KerbIcon.svg" @@ -259,10 +259,6 @@ "if": "theme=pets", "then": "./assets/layers/dogpark/dog-park.svg" }, - { - "if": "theme=pharmacies", - "then": "./assets/layers/pharmacy/pharmacy.svg" - }, { "if": "theme=play_forests", "then": "./assets/layers/play_forest/icon.svg" diff --git a/assets/themes/pharmacies/pharmacies.json b/assets/themes/pharmacies/pharmacies.json deleted file mode 100644 index 61864106a..000000000 --- a/assets/themes/pharmacies/pharmacies.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "id": "pharmacies", - "title": { - "en": "pharmacies" - }, - "description": { - "en": "On this map, pharmacies are shown and can be easily added" - }, - "maintainer": "MapComplete", - "icon": "./assets/layers/pharmacy/pharmacy.svg", - "version": "0", - "startLat": 50.8465573, - "defaultBackgroundId": "CartoDB.Voyager", - "startLon": 4.351697, - "startZoom": 16, - "widenFactor": 2, - "layers": [ - "pharmacy" - ] -} \ No newline at end of file diff --git a/assets/themes/shops/shops.json b/assets/themes/shops/shops.json index 7c30d980c..bb01f6ad2 100644 --- a/assets/themes/shops/shops.json +++ b/assets/themes/shops/shops.json @@ -42,6 +42,7 @@ "startZoom": 1, "widenFactor": 3, "layers": [ - "shops" + "shops", + "pharmacy" ] } \ No newline at end of file