From 6b840d9ef05cc5ed135e563945e546788eb53ab8 Mon Sep 17 00:00:00 2001 From: Win Olario Date: Sun, 4 Apr 2021 09:14:37 +0800 Subject: [PATCH 01/31] Initial version of hailhydrant theme --- assets/themes/hailhydrant/hailhydrant.json | 601 +++++++++++++++++++++ 1 file changed, 601 insertions(+) create mode 100644 assets/themes/hailhydrant/hailhydrant.json diff --git a/assets/themes/hailhydrant/hailhydrant.json b/assets/themes/hailhydrant/hailhydrant.json new file mode 100644 index 0000000..69e1d60 --- /dev/null +++ b/assets/themes/hailhydrant/hailhydrant.json @@ -0,0 +1,601 @@ +{ + "id": "HailHydrant", + "title": { + "en": "Hydrants, Fire and Rescue Stations, Extinguishers" + }, + "shortDescription": { + "en": "Map to show hydrants, fire and rescue stations, extinguishers" + }, + "description": { + "en": "On this map you can find and update local hydrants, fire & resue stations, and extinguishers to help make the most awesome map of your community!" + }, + "language": [ + "en" + ], + "maintainer": "", + "icon": "https://wiki.openstreetmap.org/w/images/8/8c/Hailhydrant-logo.svg", + "version": "0", + "startLat": 13.67801, + "startLon": 121.6625, + "startZoom": 6, + "widenFactor": 0.05, + "socialImage": "", + "layers": [ + { + "id": "hydrants", + "name": { + "en": "Map of hydrants" + }, + "minzoom": 14, + "overpassTags": { + "and": [ + "emergency=fire_hydrant" + ] + }, + "title": { + "render": { + "en": "Hydrant" + } + }, + "description": { + "en": "Map layer to show fire hydrants." + }, + "tagRenderings": [ + { + "question": { + "en": "What colour is the hydrant?" + }, + "render": { + "en": "The hydrant colour is {colour}" + }, + "freeform": { + "key": "colour" + }, + "mappings": [ + { + "if": { + "and": [ + "colour=yellow" + ] + }, + "then": { + "en": "The hydrant colour is yellow" + } + } + ] + }, + { + "question": { + "en": "What type of hydrant is it?" + }, + "freeform": { + "key": "fire_hydrant:type" + }, + "render": { + "en": " Hydrant type: {fire_hydrant:type}" + }, + "mappings": [ + { + "if": { + "and": [ + "fire_hydrant:type=pillar" + ] + }, + "then": { + "en": " Pillar type." + } + }, + { + "if": { + "and": [ + "fire_hydrant:type=pipe" + ] + }, + "then": { + "en": " Pipe type." + } + }, + { + "if": { + "and": [ + "fire_hydrant:type=wall" + ] + }, + "then": { + "en": " Wall type." + } + }, + { + "if": { + "and": [ + "fire_hydrant:type=underground" + ] + }, + "then": { + "en": " Underground type." + } + } + ] + }, + { + "question": { + "en": "How many couplings are there?" + }, + "render": { + "en": "Couplings: {couplings}" + }, + "freeform": { + "key": "couplings", + "type": "pnat" + }, + "mappings": [ + { + "if": { + "and": [ + "couplings=1" + ] + }, + "then": { + "en": "The hydrant has one (1) coupling." + } + }, + { + "if": { + "and": [ + "couplings=2" + ] + }, + "then": { + "en": "The hydrant has two (2) couplings." + } + }, + { + "if": { + "and": [ + "couplings=3" + ] + }, + "then": { + "en": "The hydrant has three (3) coupling." + } + } + ] + }, + { + "question": { + "en": "Update the lifecycle status of the hydrant." + }, + "render": { + "en": "Lifecycle status" + }, + "freeform": { + "key": "disused:emergency" + }, + "mappings": [ + { + "if": { + "and": [ + "emergency=fire_hydrant" + ] + }, + "then": { + "en": "Hydrant is (fully or partially) working." + } + }, + { + "if": { + "and": [ + "disused:emergency=fire_hydrant", + "emergency=" + ] + }, + "then": { + "en": "Hydrant is unavailable for use." + } + }, + { + "if": { + "and": [ + "removed:emergency=fire_hydrant", + "emergency=" + ] + }, + "then": { + "en": "Hydrant has been removed." + } + } + ] + }, + { + "question": { + "en": "Describe the position of the hydrant." + }, + "render": { + "en": "Position: {fire_hydrant:position}" + }, + "mappings": [ + { + "if": { + "and": [ + "fire_hydrant:position=sidewalk" + ] + }, + "then": { + "en": "Sidewalk" + } + }, + { + "if": { + "and": [ + "fire_hydrant:position=lane" + ] + }, + "then": { + "en": "Road-side" + } + }, + { + "if": { + "and": [ + "fire_hydrant:position=underground" + ] + }, + "then": { + "en": "Underground" + } + } + ], + "freeform": { + "key": "fire_hydrant:position" + } + }, + { + "render": { + "en": "Mapillary: {mapillary}" + }, + "question": { + "en": "Do you know the Mapillary photo id?" + }, + "freeform": { + "key": "mapillary" + } + } + ], + "hideUnderlayingFeaturesMinPercentage": 0, + "icon": { + "render": "https://upload.wikimedia.org/wikipedia/commons/6/66/Hydrant_02.svg" + }, + "width": { + "render": "8" + }, + "iconSize": { + "render": "15,15,center" + }, + "color": { + "render": "#00f" + }, + "presets": [ + { + "tags": [ + "emergency=fire_hydrant" + ], + "title": { + "en": "fire hydrant" + }, + "description": { + "en": "Add a new fire hydant to the map." + } + } + ], + "wayHandling": 1, + "osmSource": { + "overpassTags": { + "and": [ + "emergency=fire_hydrant" + ] + } + } + }, + { + "id": "extinguisher", + "name": { + "en": "Map of fire extinguishers." + }, + "minzoom": 14, + "overpassTags": { + "and": [ + "emergency=fire_extinguisher" + ] + }, + "title": { + "render": { + "en": "Extinguishers" + } + }, + "description": { + "en": "Map layer to show fire hydrants." + }, + "tagRenderings": [ + { + "render": { + "en": "Location: {location}" + }, + "question": { + "en": "Where is it positioned?" + }, + "mappings": [ + { + "if": { + "and": [ + "location=indoor" + ] + }, + "then": { + "en": "Indoor" + } + }, + { + "if": { + "and": [ + "location=outdoor" + ] + }, + "then": { + "en": "Outdoor" + } + } + ], + "freeform": { + "key": "location" + } + } + ], + "hideUnderlayingFeaturesMinPercentage": 0, + "icon": { + "render": "https://upload.wikimedia.org/wikipedia/commons/e/e8/MUTCD_RS-090.svg" + }, + "width": { + "render": "8" + }, + "iconSize": { + "render": "20,20,center" + }, + "color": { + "render": "#00f" + }, + "presets": [ + { + "tags": [ + "emergency=fire_extinguisher" + ], + "title": { + "en": "fire extinguisher" + }, + "description": { + "en": "Add a fire extinguisher to the map" + } + } + ], + "wayHandling": 1, + "osmSource": { + "overpassTags": { + "and": [ + "emergency=fire_extinguisher" + ] + } + } + }, + { + "id": "stations", + "name": { + "en": "Map of fire stations" + }, + "minzoom": 12, + "overpassTags": { + "and": [ + "amenity=fire_station" + ] + }, + "title": { + "render": { + "en": "Fire Station" + } + }, + "description": { + "en": "Map layer to show fire stations." + }, + "tagRenderings": [ + { + "freeform": { + "key": "addr:street" + }, + "question": { + "en": " What street is the station located?" + }, + "render": { + "en": "The station is along a highway called {addr:street}." + } + }, + { + "question": { + "en": "In what place is the station located? (e.g. name of neighbourhood, villlage, or town)" + }, + "freeform": { + "key": "addr:place" + }, + "render": { + "en": "The station is to be found within {addr:place}." + } + }, + { + "question": { + "en": "What agency operates this station?" + }, + "render": { + "en": "Operator: {operator}" + }, + "freeform": { + "key": "operator" + }, + "mappings": [ + { + "if": { + "and": [ + "operator=Bureau of Fire Protection", + "operator:type=public" + ] + }, + "then": { + "en": "Bureau of Fire Protection" + } + } + ] + }, + { + "question": { + "en": "How would you classifiy the operator of this station?" + }, + "render": { + "en": "Operator type: {operator:type}" + }, + "freeform": { + "key": "operator:type" + }, + "mappings": [ + { + "if": { + "and": [ + "operator:type=public" + ] + }, + "then": { + "en": "Public" + } + }, + { + "if": { + "and": [ + "operator:type=ngo" + ] + }, + "then": { + "en": "Volunteer" + } + }, + { + "if": { + "and": [ + "operator:type=community" + ] + }, + "then": { + "en": "Community-based, or informal organization" + } + }, + { + "if": { + "and": [ + "operator:type=private" + ] + }, + "then": { + "en": "Private" + } + } + ] + } + ], + "hideUnderlayingFeaturesMinPercentage": 0, + "icon": { + "render": "https://upload.wikimedia.org/wikipedia/commons/8/84/British_Columbia_W-318-L.svg" + }, + "width": { + "render": "8" + }, + "iconSize": { + "render": "20,20,center" + }, + "color": { + "render": "#00f" + }, + "presets": [ + { + "tags": [ + "amenity=fire_station" + ], + "title": { + "en": "fire station" + }, + "description": { + "en": "Add a fire station to the map." + } + } + ], + "osmSource": { + "overpassTags": { + "and": [ + "amenity=fire_station" + ] + } + } + }, + { + "id": "rescuestation", + "name": { + "en": "Map of rescue stations" + }, + "minzoom": 12, + "overpassTags": { + "and": [ + "amenity=rescue_station" + ] + }, + "title": { + "render": { + "en": "Rescue Station" + } + }, + "description": { + "en": "Map layer to show rescue stations." + }, + "tagRenderings": [], + "hideUnderlayingFeaturesMinPercentage": 0, + "icon": { + "render": "https://upload.wikimedia.org/wikipedia/commons/1/1e/Emojione_1F6A8.svg" + }, + "width": { + "render": "8" + }, + "iconSize": { + "render": "20,20,center" + }, + "color": { + "render": "#00f" + }, + "presets": [ + { + "tags": [ + "amenity=rescue_station" + ], + "title": { + "en": "rescue station" + }, + "description": { + "en": "Add a rescue or emergency service station to the map" + } + } + ], + "osmSource": { + "overpassTags": { + "and": [ + "amenity=rescue_station" + ] + } + } + } + ], + "roamingRenderings": [ + {} + ], + "defaultBackgroundId": "HDM_HOT" +} From f7954a05b050a9f4c87856f1330e239f8010331b Mon Sep 17 00:00:00 2001 From: Win Olario Date: Sun, 4 Apr 2021 09:15:41 +0800 Subject: [PATCH 02/31] add HailHydrant logo --- .../themes/hailhydrant/hailhydrant-_logo.svg | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 assets/themes/hailhydrant/hailhydrant-_logo.svg diff --git a/assets/themes/hailhydrant/hailhydrant-_logo.svg b/assets/themes/hailhydrant/hailhydrant-_logo.svg new file mode 100644 index 0000000..d491480 --- /dev/null +++ b/assets/themes/hailhydrant/hailhydrant-_logo.svg @@ -0,0 +1,53 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From c20328520333d14ad115cd95011ca1f2a68016d6 Mon Sep 17 00:00:00 2001 From: Win Olario Date: Sun, 4 Apr 2021 10:30:42 +0800 Subject: [PATCH 03/31] Update hailhydrant.json Update the the description section. --- assets/themes/hailhydrant/hailhydrant.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/themes/hailhydrant/hailhydrant.json b/assets/themes/hailhydrant/hailhydrant.json index 69e1d60..ab846e6 100644 --- a/assets/themes/hailhydrant/hailhydrant.json +++ b/assets/themes/hailhydrant/hailhydrant.json @@ -7,7 +7,7 @@ "en": "Map to show hydrants, fire and rescue stations, extinguishers" }, "description": { - "en": "On this map you can find and update local hydrants, fire & resue stations, and extinguishers to help make the most awesome map of your community!" + "en": "On this map you can find and update hydrants, fire stations, rescue stations, and extinguishers in your favorite neighborhoods.\n\nYou can track your precise location (mobile only) and select layers that are relevant for you in the bottom left corner. You can also use this tool to add or edit pins (points of interest) to the map and provide additional details by answering available questions.\n\nAll changes you make will automatically be saved in the global database of OpenStreetMap and can be freely re-used by others." }, "language": [ "en" From 0ca71d40fb95b6501634d373aaaff74b7eeb593d Mon Sep 17 00:00:00 2001 From: Win Olario Date: Sun, 4 Apr 2021 10:31:24 +0800 Subject: [PATCH 04/31] Rename hailhydrant-_logo.svg to hailhydrant_logo.svg remove the extra dash from the filename --- .../hailhydrant/{hailhydrant-_logo.svg => hailhydrant_logo.svg} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename assets/themes/hailhydrant/{hailhydrant-_logo.svg => hailhydrant_logo.svg} (100%) diff --git a/assets/themes/hailhydrant/hailhydrant-_logo.svg b/assets/themes/hailhydrant/hailhydrant_logo.svg similarity index 100% rename from assets/themes/hailhydrant/hailhydrant-_logo.svg rename to assets/themes/hailhydrant/hailhydrant_logo.svg From 2640010a7273c042411b4d87cfec81e7f96103e9 Mon Sep 17 00:00:00 2001 From: Win Olario Date: Sun, 4 Apr 2021 10:38:29 +0800 Subject: [PATCH 05/31] Update hailhydrant.json Improve some text, and fix typos. --- assets/themes/hailhydrant/hailhydrant.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/themes/hailhydrant/hailhydrant.json b/assets/themes/hailhydrant/hailhydrant.json index ab846e6..53bdef9 100644 --- a/assets/themes/hailhydrant/hailhydrant.json +++ b/assets/themes/hailhydrant/hailhydrant.json @@ -1,13 +1,13 @@ { "id": "HailHydrant", "title": { - "en": "Hydrants, Fire and Rescue Stations, Extinguishers" + "en": "Hydrants, Extinguishers, Fire stations, and Rescue stations." }, "shortDescription": { - "en": "Map to show hydrants, fire and rescue stations, extinguishers" + "en": "Map to show hydrants, extinguishers, fire stations, and rescue stations." }, "description": { - "en": "On this map you can find and update hydrants, fire stations, rescue stations, and extinguishers in your favorite neighborhoods.\n\nYou can track your precise location (mobile only) and select layers that are relevant for you in the bottom left corner. You can also use this tool to add or edit pins (points of interest) to the map and provide additional details by answering available questions.\n\nAll changes you make will automatically be saved in the global database of OpenStreetMap and can be freely re-used by others." + "en": "On this map you can find and update hydrants, fire stations, rescue stations, and extinguishers in your favorite neighborhoods. \n\nYou can track your precise location (mobile only) and select layers that are relevant for you in the bottom left corner. You can also use this tool to add or edit pins (points of interest) to the map and provide additional details by answering available questions. \n\nAll changes you make will automatically be saved in the global database of OpenStreetMap and can be freely re-used by others." }, "language": [ "en" From 92dcce5f1e2e0d0cb951b857ecc6e54afc558bd8 Mon Sep 17 00:00:00 2001 From: Win Olario Date: Mon, 5 Apr 2021 11:07:53 +0800 Subject: [PATCH 06/31] Rename hailhydrant_logo.svg to logo.svg --- assets/themes/hailhydrant/{hailhydrant_logo.svg => logo.svg} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename assets/themes/hailhydrant/{hailhydrant_logo.svg => logo.svg} (100%) diff --git a/assets/themes/hailhydrant/hailhydrant_logo.svg b/assets/themes/hailhydrant/logo.svg similarity index 100% rename from assets/themes/hailhydrant/hailhydrant_logo.svg rename to assets/themes/hailhydrant/logo.svg From 1a5faad247ba45698d176ffbe96ff51d190c97b6 Mon Sep 17 00:00:00 2001 From: Win Olario Date: Mon, 5 Apr 2021 11:09:15 +0800 Subject: [PATCH 07/31] update reference to logo from repo --- assets/themes/hailhydrant/hailhydrant.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/themes/hailhydrant/hailhydrant.json b/assets/themes/hailhydrant/hailhydrant.json index 53bdef9..3447cac 100644 --- a/assets/themes/hailhydrant/hailhydrant.json +++ b/assets/themes/hailhydrant/hailhydrant.json @@ -13,7 +13,7 @@ "en" ], "maintainer": "", - "icon": "https://wiki.openstreetmap.org/w/images/8/8c/Hailhydrant-logo.svg", + "icon": "assets/themes/hailhydrant/logo.svg", "version": "0", "startLat": 13.67801, "startLon": 121.6625, From c737eaa623bde5b5430c7a4e2ef63e72182287a1 Mon Sep 17 00:00:00 2001 From: Win Olario Date: Mon, 5 Apr 2021 11:17:18 +0800 Subject: [PATCH 08/31] add yellow colour option for hydrant --- assets/themes/hailhydrant/hailhydrant.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/assets/themes/hailhydrant/hailhydrant.json b/assets/themes/hailhydrant/hailhydrant.json index 3447cac..185c5c5 100644 --- a/assets/themes/hailhydrant/hailhydrant.json +++ b/assets/themes/hailhydrant/hailhydrant.json @@ -52,6 +52,16 @@ "key": "colour" }, "mappings": [ + { + "if": { + "and": [ + "colour=red" + ] + }, + "then": { + "en": "The hydrant colour is red" + } + }, { "if": { "and": [ From 85edcea1fd8982053b993c6d382364c754d16b38 Mon Sep 17 00:00:00 2001 From: Win Olario Date: Sun, 11 Apr 2021 11:10:09 +0800 Subject: [PATCH 09/31] Update hailhydrant.json Keeping things simple. Removed the Mapillary id, coupling question for the hydrant layer. Improved the text of some question/answers. Added icons from https://mapcomplete.braindeaddev.com/fire , but I'm not sure what their licenses are. --- assets/themes/hailhydrant/hailhydrant.json | 140 ++++----------------- 1 file changed, 21 insertions(+), 119 deletions(-) diff --git a/assets/themes/hailhydrant/hailhydrant.json b/assets/themes/hailhydrant/hailhydrant.json index 185c5c5..667d79d 100644 --- a/assets/themes/hailhydrant/hailhydrant.json +++ b/assets/themes/hailhydrant/hailhydrant.json @@ -1,5 +1,5 @@ { - "id": "HailHydrant", + "id": "hailhydrant", "title": { "en": "Hydrants, Extinguishers, Fire stations, and Rescue stations." }, @@ -7,7 +7,7 @@ "en": "Map to show hydrants, extinguishers, fire stations, and rescue stations." }, "description": { - "en": "On this map you can find and update hydrants, fire stations, rescue stations, and extinguishers in your favorite neighborhoods. \n\nYou can track your precise location (mobile only) and select layers that are relevant for you in the bottom left corner. You can also use this tool to add or edit pins (points of interest) to the map and provide additional details by answering available questions. \n\nAll changes you make will automatically be saved in the global database of OpenStreetMap and can be freely re-used by others." + "en": "On this map you can find and update hydrants, fire stations, rescue stations, and extinguishers in your favorite neighborhoods. \n\nYou can track your precise location (mobile only) and select layers that are relevant for you in the bottom left corner. You can also use this tool to add or edit pins (points of interest) to the map and provide additional details by answering available questions. \n\nAll changes you make will automatically be saved in the global database of OpenStreetMap and can be freely re-used by others." }, "language": [ "en" @@ -43,10 +43,10 @@ "tagRenderings": [ { "question": { - "en": "What colour is the hydrant?" + "en": "What color is the hydrant?" }, "render": { - "en": "The hydrant colour is {colour}" + "en": "The hydrant color is {colour}" }, "freeform": { "key": "colour" @@ -55,21 +55,21 @@ { "if": { "and": [ - "colour=red" + "colour=yellow" ] }, "then": { - "en": "The hydrant colour is red" + "en": "The hydrant color is yellow." } }, { "if": { "and": [ - "colour=yellow" + "colour=red" ] }, "then": { - "en": "The hydrant colour is yellow" + "en": "The hydrant color is red." } } ] @@ -92,7 +92,7 @@ ] }, "then": { - "en": " Pillar type." + "en": " Pillar type." } }, { @@ -102,7 +102,7 @@ ] }, "then": { - "en": " Pipe type." + "en": " Pipe type." } }, { @@ -112,7 +112,7 @@ ] }, "then": { - "en": " Wall type." + "en": " Wall type." } }, { @@ -122,51 +122,7 @@ ] }, "then": { - "en": " Underground type." - } - } - ] - }, - { - "question": { - "en": "How many couplings are there?" - }, - "render": { - "en": "Couplings: {couplings}" - }, - "freeform": { - "key": "couplings", - "type": "pnat" - }, - "mappings": [ - { - "if": { - "and": [ - "couplings=1" - ] - }, - "then": { - "en": "The hydrant has one (1) coupling." - } - }, - { - "if": { - "and": [ - "couplings=2" - ] - }, - "then": { - "en": "The hydrant has two (2) couplings." - } - }, - { - "if": { - "and": [ - "couplings=3" - ] - }, - "then": { - "en": "The hydrant has three (3) coupling." + "en": " Underground type." } } ] @@ -189,7 +145,7 @@ ] }, "then": { - "en": "Hydrant is (fully or partially) working." + "en": "The hydrant is (fully or partially) working." } }, { @@ -200,7 +156,7 @@ ] }, "then": { - "en": "Hydrant is unavailable for use." + "en": "The hydrant is unavailable." } }, { @@ -211,64 +167,10 @@ ] }, "then": { - "en": "Hydrant has been removed." + "en": "The hydrant has been removed." } } ] - }, - { - "question": { - "en": "Describe the position of the hydrant." - }, - "render": { - "en": "Position: {fire_hydrant:position}" - }, - "mappings": [ - { - "if": { - "and": [ - "fire_hydrant:position=sidewalk" - ] - }, - "then": { - "en": "Sidewalk" - } - }, - { - "if": { - "and": [ - "fire_hydrant:position=lane" - ] - }, - "then": { - "en": "Road-side" - } - }, - { - "if": { - "and": [ - "fire_hydrant:position=underground" - ] - }, - "then": { - "en": "Underground" - } - } - ], - "freeform": { - "key": "fire_hydrant:position" - } - }, - { - "render": { - "en": "Mapillary: {mapillary}" - }, - "question": { - "en": "Do you know the Mapillary photo id?" - }, - "freeform": { - "key": "mapillary" - } } ], "hideUnderlayingFeaturesMinPercentage": 0, @@ -290,10 +192,10 @@ "emergency=fire_hydrant" ], "title": { - "en": "fire hydrant" + "en": "Fire hydrant" }, "description": { - "en": "Add a new fire hydant to the map." + "en": "Add a new fire hydrant to the map." } } ], @@ -341,7 +243,7 @@ ] }, "then": { - "en": "Indoor" + "en": "Found indoors." } }, { @@ -351,7 +253,7 @@ ] }, "then": { - "en": "Outdoor" + "en": "Found outdoors." } } ], @@ -379,7 +281,7 @@ "emergency=fire_extinguisher" ], "title": { - "en": "fire extinguisher" + "en": "Fire extinguisher" }, "description": { "en": "Add a fire extinguisher to the map" @@ -428,7 +330,7 @@ }, { "question": { - "en": "In what place is the station located? (e.g. name of neighbourhood, villlage, or town)" + "en": "In what place is the station located? (e.g. name of neighborhood, villlage, or town)" }, "freeform": { "key": "addr:place" From 5ace16d2bcb9d983f215a5c6318a42e6097030a5 Mon Sep 17 00:00:00 2001 From: Win Olario Date: Sun, 11 Apr 2021 16:12:56 +0800 Subject: [PATCH 10/31] adding new cc0-licensed icons --- .../themes/hailhydrant/blue-signal-light.svg | 115 +++++ assets/themes/hailhydrant/extinguisher.svg | 243 +++++++++++ assets/themes/hailhydrant/fire_brigade.svg | 408 ++++++++++++++++++ assets/themes/hailhydrant/license_info.json | 34 ++ .../themes/hailhydrant/yellowfirehydrant.svg | 5 + 5 files changed, 805 insertions(+) create mode 100644 assets/themes/hailhydrant/blue-signal-light.svg create mode 100644 assets/themes/hailhydrant/extinguisher.svg create mode 100644 assets/themes/hailhydrant/fire_brigade.svg create mode 100644 assets/themes/hailhydrant/license_info.json create mode 100644 assets/themes/hailhydrant/yellowfirehydrant.svg diff --git a/assets/themes/hailhydrant/blue-signal-light.svg b/assets/themes/hailhydrant/blue-signal-light.svg new file mode 100644 index 0000000..bcd6978 --- /dev/null +++ b/assets/themes/hailhydrant/blue-signal-light.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Openclipart + + + Blue signal light + 2013-05-10T09:38:15 + + https://openclipart.org/detail/177928/blue-signal-light-by-qubodup-177928 + + + qubodup + + + + + alarm + blue + emergency + fire brigade + fire truck + first aid + light + police + signal + siren + + + + + + + + + + + \ No newline at end of file diff --git a/assets/themes/hailhydrant/extinguisher.svg b/assets/themes/hailhydrant/extinguisher.svg new file mode 100644 index 0000000..79f7b2e --- /dev/null +++ b/assets/themes/hailhydrant/extinguisher.svg @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/themes/hailhydrant/fire_brigade.svg b/assets/themes/hailhydrant/fire_brigade.svg new file mode 100644 index 0000000..9fa4bee --- /dev/null +++ b/assets/themes/hailhydrant/fire_brigade.svg @@ -0,0 +1,408 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fire Brigade + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fire Brigade + + \ No newline at end of file diff --git a/assets/themes/hailhydrant/license_info.json b/assets/themes/hailhydrant/license_info.json new file mode 100644 index 0000000..f2c89c3 --- /dev/null +++ b/assets/themes/hailhydrant/license_info.json @@ -0,0 +1,34 @@ +[ + { + "authors": ["https://openclipart.org/artist/rones"], + "path": "extinguisher.svg", + "license": "CC0", + "sources": [ + "https://openclipart.org/detail/315876/fire-extinguisher" + ] + }, + { + "authors": ["https://openclipart.org/artist/j4p4n"], + "path": "yellowfirehydrant.svg", + "license": "CC0", + "sources": [ + "https://openclipart.org/detail/326295/yellow-fire-hydrant" + ] + }, + { + "authors": ["https://openclipart.org/artist/TVLuke"], + "path": "fire_brigade.svg", + "license": "CC0", + "sources": [ + "https://openclipart.org/detail/318142/fire-brigade" + ] + }, + { + "authors": ["https://openclipart.org/artist/qubodup"], + "path": "blue_signal_light.svg", + "license": "CC0", + "sources": [ + "https://openclipart.org/detail/177928/blue-signal-light" + ] + } +] diff --git a/assets/themes/hailhydrant/yellowfirehydrant.svg b/assets/themes/hailhydrant/yellowfirehydrant.svg new file mode 100644 index 0000000..2dd20a7 --- /dev/null +++ b/assets/themes/hailhydrant/yellowfirehydrant.svg @@ -0,0 +1,5 @@ + + +image/svg+xmlj4p4n \ No newline at end of file From 36a0bfff2dae441cc465bcb3ce30cc3b5899331f Mon Sep 17 00:00:00 2001 From: Win Olario Date: Sun, 11 Apr 2021 16:18:47 +0800 Subject: [PATCH 11/31] replace fire_brigade.svg with simpler version --- assets/themes/hailhydrant/fire_brigade.svg | 1484 ++++++++++++++++---- 1 file changed, 1206 insertions(+), 278 deletions(-) diff --git a/assets/themes/hailhydrant/fire_brigade.svg b/assets/themes/hailhydrant/fire_brigade.svg index 9fa4bee..445579f 100644 --- a/assets/themes/hailhydrant/fire_brigade.svg +++ b/assets/themes/hailhydrant/fire_brigade.svg @@ -1,408 +1,1336 @@ - - - - +image/svg+xml + + + + + + + - - + + + - - - - - - - - - - - - - - - - - + + + - - + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - - + + + - + - - + + - - - + + + - + - - - + + + - + - - + + - - - + + + - - + + - + - - - + + + - - - + + + - - + + - + - - - + + + - - + + - + - - - + + + - - + + - + - - - + + + - - + + - + - - - + + + - - + + - + - - - + + + - - + + - + - - - + + + - - + + - + - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - - + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - Fire Brigade + + Fire Brigade + - - - - - + + + + + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - - - - + + + + + - - + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - - Fire Brigade - + + \ No newline at end of file From 0dbd0b233329e9a05e8c16cddd09c72018b6c7ae Mon Sep 17 00:00:00 2001 From: Win Olario Date: Sun, 11 Apr 2021 16:20:20 +0800 Subject: [PATCH 12/31] replace fire_brigade.svg without clouds --- assets/themes/hailhydrant/fire_brigade.svg | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/assets/themes/hailhydrant/fire_brigade.svg b/assets/themes/hailhydrant/fire_brigade.svg index 445579f..ad6e4fd 100644 --- a/assets/themes/hailhydrant/fire_brigade.svg +++ b/assets/themes/hailhydrant/fire_brigade.svg @@ -33,9 +33,9 @@ inkscape:window-height="480" id="namedview549" showgrid="false" - inkscape:zoom="0.23536982" - inkscape:cx="649.16539" - inkscape:cy="263.51886" + inkscape:zoom="0.11768491" + inkscape:cx="379.96667" + inkscape:cy="1109.7561" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="0" @@ -56,17 +56,7 @@ style="fill:#c1c1c3" id="rect20" /> - - - - + @@ -1062,6 +1052,7 @@ style="font-family:'Copperplate';font-size:50px;fill:rgb(229,242,13);" id="text415">Fire Brigade + From 33d147413af0a8f37513d903c0558718a8217c26 Mon Sep 17 00:00:00 2001 From: Win Olario Date: Sun, 11 Apr 2021 16:30:51 +0800 Subject: [PATCH 13/31] update license_info.json, add new icons --- assets/themes/hailhydrant/Fire-truck.svg | 303 ++++++++++++++++++ assets/themes/hailhydrant/fire-station-15.svg | 6 + assets/themes/hailhydrant/license_info.json | 18 +- 3 files changed, 326 insertions(+), 1 deletion(-) create mode 100644 assets/themes/hailhydrant/Fire-truck.svg create mode 100644 assets/themes/hailhydrant/fire-station-15.svg diff --git a/assets/themes/hailhydrant/Fire-truck.svg b/assets/themes/hailhydrant/Fire-truck.svg new file mode 100644 index 0000000..767960f --- /dev/null +++ b/assets/themes/hailhydrant/Fire-truck.svg @@ -0,0 +1,303 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Openclipart + + + + + + + + + + + \ No newline at end of file diff --git a/assets/themes/hailhydrant/fire-station-15.svg b/assets/themes/hailhydrant/fire-station-15.svg new file mode 100644 index 0000000..14b0c9b --- /dev/null +++ b/assets/themes/hailhydrant/fire-station-15.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/assets/themes/hailhydrant/license_info.json b/assets/themes/hailhydrant/license_info.json index f2c89c3..28d5111 100644 --- a/assets/themes/hailhydrant/license_info.json +++ b/assets/themes/hailhydrant/license_info.json @@ -25,10 +25,26 @@ }, { "authors": ["https://openclipart.org/artist/qubodup"], - "path": "blue_signal_light.svg", + "path": "blue-signal-light.svg", "license": "CC0", "sources": [ "https://openclipart.org/detail/177928/blue-signal-light" ] + }, + { + "authors": ["https://www.mapbox.com/maki-icons/"], + "path": "fire-station-15.svg", + "license": "CC0", + "sources": [ + "https://openclipart.org/detail/260728/firestation15" + ] + }, + { + "authors": ["https://openclipart.org/artist/rdevries"], + "path": "Fire-truck.svg", + "license": "CC0", + "sources": [ + "https://openclipart.org/detail/190874/fire-truck" + ] } ] From de1fcd169bfad21eaa19b84ca8fea07d307540de Mon Sep 17 00:00:00 2001 From: Win Olario Date: Sun, 11 Apr 2021 19:48:12 +0800 Subject: [PATCH 14/31] Delete yellowfirehydrant.svg --- assets/themes/hailhydrant/yellowfirehydrant.svg | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 assets/themes/hailhydrant/yellowfirehydrant.svg diff --git a/assets/themes/hailhydrant/yellowfirehydrant.svg b/assets/themes/hailhydrant/yellowfirehydrant.svg deleted file mode 100644 index 2dd20a7..0000000 --- a/assets/themes/hailhydrant/yellowfirehydrant.svg +++ /dev/null @@ -1,5 +0,0 @@ - - -image/svg+xmlj4p4n \ No newline at end of file From 3a2dcde4ecf6a41af030be1f58b2815913738243 Mon Sep 17 00:00:00 2001 From: Win Olario Date: Sun, 11 Apr 2021 19:48:46 +0800 Subject: [PATCH 15/31] update license_info.json, add hydrant.svg --- assets/themes/hailhydrant/hydrant.svg | 107 ++++++++++++++++++++ assets/themes/hailhydrant/license_info.json | 8 +- 2 files changed, 111 insertions(+), 4 deletions(-) create mode 100644 assets/themes/hailhydrant/hydrant.svg diff --git a/assets/themes/hailhydrant/hydrant.svg b/assets/themes/hailhydrant/hydrant.svg new file mode 100644 index 0000000..0dbda22 --- /dev/null +++ b/assets/themes/hailhydrant/hydrant.svg @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/themes/hailhydrant/license_info.json b/assets/themes/hailhydrant/license_info.json index 28d5111..eec8d11 100644 --- a/assets/themes/hailhydrant/license_info.json +++ b/assets/themes/hailhydrant/license_info.json @@ -8,11 +8,11 @@ ] }, { - "authors": ["https://openclipart.org/artist/j4p4n"], - "path": "yellowfirehydrant.svg", - "license": "CC0", + "authors": ["http://jaanos.deviantart.com/"], + "path": "hydrant.svg", + "license": "GPL", "sources": [ - "https://openclipart.org/detail/326295/yellow-fire-hydrant" + "https://commons.wikimedia.org/wiki/File:Hydrant.svg" ] }, { From 1c902ca9c57cc58eecd42f043603d6d5e6a83c57 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sun, 11 Apr 2021 14:11:02 +0200 Subject: [PATCH 16/31] Wrote a script to autofix issues with themes, applied this on the hailhydrant theme --- .../hailhydrant/British_Columbia_W-318-L.svg | 35 ++ assets/themes/hailhydrant/Emojione_1F6A8.svg | 1 + assets/themes/hailhydrant/Hydrant_02.svg | 526 ++++++++++++++++++ assets/themes/hailhydrant/MUTCD_RS-090.svg | 90 +++ assets/themes/hailhydrant/hailhydrant.json | 67 +-- assets/themes/hailhydrant/hydrant_pillar.svg | 5 + .../hailhydrant/hydrant_underground.svg | 5 + assets/themes/hailhydrant/hydrant_unknown.svg | 5 + assets/themes/hailhydrant/license_info.json | 92 ++- generated.license_info.json | 58 ++ package.json | 2 +- scripts/fixTheme.ts | 63 +++ scripts/generateLayerOverview.ts | 7 +- scripts/generateLicenseInfo.ts | 7 +- 14 files changed, 910 insertions(+), 53 deletions(-) create mode 100644 assets/themes/hailhydrant/British_Columbia_W-318-L.svg create mode 100644 assets/themes/hailhydrant/Emojione_1F6A8.svg create mode 100644 assets/themes/hailhydrant/Hydrant_02.svg create mode 100644 assets/themes/hailhydrant/MUTCD_RS-090.svg create mode 100644 assets/themes/hailhydrant/hydrant_pillar.svg create mode 100644 assets/themes/hailhydrant/hydrant_underground.svg create mode 100644 assets/themes/hailhydrant/hydrant_unknown.svg create mode 100644 generated.license_info.json create mode 100644 scripts/fixTheme.ts diff --git a/assets/themes/hailhydrant/British_Columbia_W-318-L.svg b/assets/themes/hailhydrant/British_Columbia_W-318-L.svg new file mode 100644 index 0000000..11beaf4 --- /dev/null +++ b/assets/themes/hailhydrant/British_Columbia_W-318-L.svg @@ -0,0 +1,35 @@ + +image/svg+xml + + + + + \ No newline at end of file diff --git a/assets/themes/hailhydrant/Emojione_1F6A8.svg b/assets/themes/hailhydrant/Emojione_1F6A8.svg new file mode 100644 index 0000000..2a00519 --- /dev/null +++ b/assets/themes/hailhydrant/Emojione_1F6A8.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/themes/hailhydrant/Hydrant_02.svg b/assets/themes/hailhydrant/Hydrant_02.svg new file mode 100644 index 0000000..257691f --- /dev/null +++ b/assets/themes/hailhydrant/Hydrant_02.svg @@ -0,0 +1,526 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/themes/hailhydrant/MUTCD_RS-090.svg b/assets/themes/hailhydrant/MUTCD_RS-090.svg new file mode 100644 index 0000000..21f349c --- /dev/null +++ b/assets/themes/hailhydrant/MUTCD_RS-090.svg @@ -0,0 +1,90 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/assets/themes/hailhydrant/hailhydrant.json b/assets/themes/hailhydrant/hailhydrant.json index 667d79d..c4c0e7e 100644 --- a/assets/themes/hailhydrant/hailhydrant.json +++ b/assets/themes/hailhydrant/hailhydrant.json @@ -27,11 +27,6 @@ "en": "Map of hydrants" }, "minzoom": 14, - "overpassTags": { - "and": [ - "emergency=fire_hydrant" - ] - }, "title": { "render": { "en": "Hydrant" @@ -92,7 +87,7 @@ ] }, "then": { - "en": " Pillar type." + "en": " Pillar type." } }, { @@ -102,7 +97,7 @@ ] }, "then": { - "en": " Pipe type." + "en": " Pipe type." } }, { @@ -112,7 +107,7 @@ ] }, "then": { - "en": " Wall type." + "en": " Wall type." } }, { @@ -122,7 +117,7 @@ ] }, "then": { - "en": " Underground type." + "en": " Underground type." } } ] @@ -175,7 +170,7 @@ ], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "https://upload.wikimedia.org/wikipedia/commons/6/66/Hydrant_02.svg" + "render": "Hydrant_02.svg" }, "width": { "render": "8" @@ -206,6 +201,13 @@ "emergency=fire_hydrant" ] } + }, + "source": { + "osmTags": { + "and": [ + "emergency=fire_hydrant" + ] + } } }, { @@ -214,11 +216,6 @@ "en": "Map of fire extinguishers." }, "minzoom": 14, - "overpassTags": { - "and": [ - "emergency=fire_extinguisher" - ] - }, "title": { "render": { "en": "Extinguishers" @@ -264,7 +261,7 @@ ], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "https://upload.wikimedia.org/wikipedia/commons/e/e8/MUTCD_RS-090.svg" + "render": "MUTCD_RS-090.svg" }, "width": { "render": "8" @@ -295,6 +292,13 @@ "emergency=fire_extinguisher" ] } + }, + "source": { + "osmTags": { + "and": [ + "emergency=fire_extinguisher" + ] + } } }, { @@ -303,11 +307,6 @@ "en": "Map of fire stations" }, "minzoom": 12, - "overpassTags": { - "and": [ - "amenity=fire_station" - ] - }, "title": { "render": { "en": "Fire Station" @@ -419,7 +418,7 @@ ], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "https://upload.wikimedia.org/wikipedia/commons/8/84/British_Columbia_W-318-L.svg" + "render": "British_Columbia_W-318-L.svg" }, "width": { "render": "8" @@ -449,6 +448,13 @@ "amenity=fire_station" ] } + }, + "source": { + "osmTags": { + "and": [ + "amenity=fire_station" + ] + } } }, { @@ -457,11 +463,6 @@ "en": "Map of rescue stations" }, "minzoom": 12, - "overpassTags": { - "and": [ - "amenity=rescue_station" - ] - }, "title": { "render": { "en": "Rescue Station" @@ -473,7 +474,7 @@ "tagRenderings": [], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "https://upload.wikimedia.org/wikipedia/commons/1/1e/Emojione_1F6A8.svg" + "render": "Emojione_1F6A8.svg" }, "width": { "render": "8" @@ -503,11 +504,15 @@ "amenity=rescue_station" ] } + }, + "source": { + "osmTags": { + "and": [ + "amenity=rescue_station" + ] + } } } ], - "roamingRenderings": [ - {} - ], "defaultBackgroundId": "HDM_HOT" } diff --git a/assets/themes/hailhydrant/hydrant_pillar.svg b/assets/themes/hailhydrant/hydrant_pillar.svg new file mode 100644 index 0000000..27ef663 --- /dev/null +++ b/assets/themes/hailhydrant/hydrant_pillar.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/themes/hailhydrant/hydrant_underground.svg b/assets/themes/hailhydrant/hydrant_underground.svg new file mode 100644 index 0000000..f7c0f3d --- /dev/null +++ b/assets/themes/hailhydrant/hydrant_underground.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/themes/hailhydrant/hydrant_unknown.svg b/assets/themes/hailhydrant/hydrant_unknown.svg new file mode 100644 index 0000000..10b31cd --- /dev/null +++ b/assets/themes/hailhydrant/hydrant_unknown.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/themes/hailhydrant/license_info.json b/assets/themes/hailhydrant/license_info.json index 28d5111..e643238 100644 --- a/assets/themes/hailhydrant/license_info.json +++ b/assets/themes/hailhydrant/license_info.json @@ -1,50 +1,118 @@ [ { - "authors": ["https://openclipart.org/artist/rones"], + "authors": [ + "https://openclipart.org/artist/rones" + ], "path": "extinguisher.svg", "license": "CC0", "sources": [ "https://openclipart.org/detail/315876/fire-extinguisher" ] }, - { - "authors": ["https://openclipart.org/artist/j4p4n"], + { + "authors": [ + "https://openclipart.org/artist/j4p4n" + ], "path": "yellowfirehydrant.svg", "license": "CC0", "sources": [ "https://openclipart.org/detail/326295/yellow-fire-hydrant" ] }, - { - "authors": ["https://openclipart.org/artist/TVLuke"], + { + "authors": [ + "https://openclipart.org/artist/TVLuke" + ], "path": "fire_brigade.svg", "license": "CC0", "sources": [ "https://openclipart.org/detail/318142/fire-brigade" ] }, - { - "authors": ["https://openclipart.org/artist/qubodup"], + { + "authors": [ + "https://openclipart.org/artist/qubodup" + ], "path": "blue-signal-light.svg", "license": "CC0", "sources": [ "https://openclipart.org/detail/177928/blue-signal-light" ] }, - { - "authors": ["https://www.mapbox.com/maki-icons/"], + { + "authors": [ + "https://www.mapbox.com/maki-icons/" + ], "path": "fire-station-15.svg", "license": "CC0", "sources": [ "https://openclipart.org/detail/260728/firestation15" ] }, - { - "authors": ["https://openclipart.org/artist/rdevries"], + { + "authors": [ + "https://openclipart.org/artist/rdevries" + ], "path": "Fire-truck.svg", "license": "CC0", "sources": [ "https://openclipart.org/detail/190874/fire-truck" ] + }, + { + "path": "hydrant_pillar.svg", + "license": "", + "authors": [], + "sources": [ + "https://mapcomplete.braindeaddev.com/assets/layers/fire/hydrant_pillar.svg" + ] + }, + { + "path": "hydrant_unknown.svg", + "license": "", + "authors": [], + "sources": [ + "https://mapcomplete.braindeaddev.com/assets/layers/fire/hydrant_unknown.svg" + ] + }, + { + "path": "hydrant_underground.svg", + "license": "", + "authors": [], + "sources": [ + "https://mapcomplete.braindeaddev.com/assets/layers/fire/hydrant_underground.svg" + ] + }, + { + "path": "Hydrant_02.svg", + "license": "", + "authors": [], + "sources": [ + "https://upload.wikimedia.org/wikipedia/commons/6/66/Hydrant_02.svg" + ] + }, + { + "path": "MUTCD_RS-090.svg", + "license": "", + "authors": [], + "sources": [ + "https://upload.wikimedia.org/wikipedia/commons/e/e8/MUTCD_RS-090.svg" + ] + }, + { + "path": "British_Columbia_W-318-L.svg", + "license": "", + "authors": [], + "sources": [ + "https://upload.wikimedia.org/wikipedia/commons/8/84/British_Columbia_W-318-L.svg" + ] + }, + { + "path": "Emojione_1F6A8.svg", + "license": "", + "authors": [], + "sources": [ + "https://upload.wikimedia.org/wikipedia/commons/1/1e/Emojione_1F6A8.svg" + ] } -] +] \ No newline at end of file diff --git a/generated.license_info.json b/generated.license_info.json new file mode 100644 index 0000000..83e959f --- /dev/null +++ b/generated.license_info.json @@ -0,0 +1,58 @@ +[ + { + "path": "hydrant_pillar.svg", + "license": "", + "authors": [], + "sources": [ + "https://mapcomplete.braindeaddev.com/assets/layers/fire/hydrant_pillar.svg" + ] + }, + { + "path": "hydrant_unknown.svg", + "license": "", + "authors": [], + "sources": [ + "https://mapcomplete.braindeaddev.com/assets/layers/fire/hydrant_unknown.svg" + ] + }, + { + "path": "hydrant_underground.svg", + "license": "", + "authors": [], + "sources": [ + "https://mapcomplete.braindeaddev.com/assets/layers/fire/hydrant_underground.svg" + ] + }, + { + "path": "Hydrant_02.svg", + "license": "", + "authors": [], + "sources": [ + "https://upload.wikimedia.org/wikipedia/commons/6/66/Hydrant_02.svg" + ] + }, + { + "path": "MUTCD_RS-090.svg", + "license": "", + "authors": [], + "sources": [ + "https://upload.wikimedia.org/wikipedia/commons/e/e8/MUTCD_RS-090.svg" + ] + }, + { + "path": "British_Columbia_W-318-L.svg", + "license": "", + "authors": [], + "sources": [ + "https://upload.wikimedia.org/wikipedia/commons/8/84/British_Columbia_W-318-L.svg" + ] + }, + { + "path": "Emojione_1F6A8.svg", + "license": "", + "authors": [], + "sources": [ + "https://upload.wikimedia.org/wikipedia/commons/1/1e/Emojione_1F6A8.svg" + ] + } +] \ No newline at end of file diff --git a/package.json b/package.json index cc36ca8..fc033d2 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "main": "index.js", "scripts": { "increase-memory": "export NODE_OPTIONS=--max_old_space_size=4096", - "start": "ts-node scripts/generateLayerOverview.ts && npm run increase-memory && parcel *.html UI/** Logic/** assets/** assets/**/** assets/**/**/** vendor/* vendor/*/*", + "start": "ts-node scripts/generateLayerOverview.ts --no-fail && npm run increase-memory && parcel *.html UI/** Logic/** assets/** assets/**/** assets/**/**/** vendor/* vendor/*/*", "test": "ts-node test/Tag.spec.ts && ts-node test/TagQuestion.spec.ts && ts-node test/ImageSearcher.spec.ts && ts-node test/ImageAttribution.spec.ts", "generate:editor-layer-index": "cd assets/ && wget https://osmlab.github.io/editor-layer-index/imagery.geojson --output-document=editor-layer-index.json", "generate:images": "ts-node scripts/generateIncludedImages.ts", diff --git a/scripts/fixTheme.ts b/scripts/fixTheme.ts new file mode 100644 index 0000000..80de8a7 --- /dev/null +++ b/scripts/fixTheme.ts @@ -0,0 +1,63 @@ + +/* + * This script attempt to automatically fix some basic issues when a theme from the custom generator is loaded + */ +import {Utils} from "../Utils" +Utils.runningFromConsole = true; +import {readFileSync, writeFileSync} from "fs"; +import {LayoutConfigJson} from "../Customizations/JSON/LayoutConfigJson"; +import {Layer} from "leaflet"; +import LayerConfig from "../Customizations/JSON/LayerConfig"; +import SmallLicense from "../Models/smallLicense"; + +if(process.argv.length == 2){ + console.log("USAGE: ts-node scripts/fixTheme ") + throw "No path specified" +} + +const path = process.argv[2] +console.log("Fixing up ", path) + +const themeConfigJson : LayoutConfigJson = JSON.parse(readFileSync(path, "UTF8")) + +const linuxHints = [] +const licenses : SmallLicense[] = [] + +const replacements: {source: string, destination: string}[] = [] + +for (const layerConfigJson of themeConfigJson.layers) { + if(typeof (layerConfigJson) === "string"){ + continue; + } + if(layerConfigJson["overpassTags"] !== undefined){ + const tags = layerConfigJson["overpassTags"]; + layerConfigJson["overpassTags"] = undefined; + layerConfigJson["source"] = { osmTags : tags} + } + // @ts-ignore + const layerConfig = new LayerConfig(layerConfigJson, true) + const images : string[] = Array.from(layerConfig.ExtractImages()) + const remoteImages = images.filter(img => img.startsWith("http")) + for (const remoteImage of remoteImages) { + linuxHints.push("wget " + remoteImage) + const imgPath = remoteImage.substring(remoteImage.lastIndexOf("/") + 1) + licenses.push({ + path: imgPath, + license: "", + authors: [], + sources: [remoteImage] + }) + replacements.push({source: remoteImage, destination: imgPath}) + } +} + +let fixedThemeJson = JSON.stringify(themeConfigJson, null , " ") +for (const replacement of replacements) { + fixedThemeJson = fixedThemeJson.replace(new RegExp(replacement.source, "g"), replacement.destination) +} + +const dir = path.substring(0, path.lastIndexOf("/")) +writeFileSync(dir + "/generated.license_info.json", JSON.stringify(licenses, null, " ")) +writeFileSync(dir + "/fix_script_"+path.replace(/\//g,"_")+".sh", linuxHints.join("\n")) +writeFileSync(path+".autofixed.json", fixedThemeJson) + \ No newline at end of file diff --git a/scripts/generateLayerOverview.ts b/scripts/generateLayerOverview.ts index 6443266..77d26c2 100644 --- a/scripts/generateLayerOverview.ts +++ b/scripts/generateLayerOverview.ts @@ -51,8 +51,6 @@ for (const i in licenses) { } const knownPaths = new Set(licensePaths) -const linuxHints = [] - function validateLayer(layerJson: LayerConfigJson, context?: string): string[] { let errorCount = []; if (layerJson["overpassTags"] !== undefined) { @@ -65,9 +63,7 @@ function validateLayer(layerJson: LayerConfigJson, context?: string): string[] { for (const remoteImage of remoteImages) { errorCount.push("Found a remote image: " + remoteImage + " in layer " + layer.id + ", please download it.") const path = remoteImage.substring(remoteImage.lastIndexOf("/") + 1) - linuxHints.push("wget " + remoteImage) - linuxHints.push(`echo '{"path":"${path}", "license": "", "authors": [ " ${path}.license_info.json`) - } + } for (const image of images) { if (!knownPaths.has(image)) { const ctx = context === undefined ? "" : ` in a layer defined in the theme ${context}` @@ -129,7 +125,6 @@ if (layerErrorCount.length + themeErrorCount.length == 0) { console.log(errors) const msg = (`Found ${layerErrorCount.length} errors in the layers; ${themeErrorCount.length} errors in the themes`) console.log(msg) - console.log(linuxHints.join("\n")) if (process.argv.indexOf("--report") >= 0) { console.log("Writing report!") writeFileSync("layer_report.txt", errors) diff --git a/scripts/generateLicenseInfo.ts b/scripts/generateLicenseInfo.ts index 05a00f7..f7c0723 100644 --- a/scripts/generateLicenseInfo.ts +++ b/scripts/generateLicenseInfo.ts @@ -193,17 +193,18 @@ writeFileSync("./assets/generated/license_info.json", JSON.stringify(licenseInfo const artwork = contents.filter(pth => pth.match(/(.svg|.png|.jpg)$/i) != null) const missingLicenses = missingLicenseInfos(licenseInfos, artwork) - +const invalidLicenses = licenseInfos.filter(l => (l.license ?? "") === "").map(l => `License for artwork ${l.path} is empty string or undefined`) if (process.argv.indexOf("--prompt") >= 0 || process.argv.indexOf("--query") >= 0) { queryMissingLicenses(missingLicenses) } if (missingLicenses.length > 0) { - const msg = `There are ${missingLicenses.length} licenses missing.` + const msg = `There are ${missingLicenses.length} licenses missing and ${invalidLicenses.length} invalid licenses.` + console.log( missingLicenses.concat(invalidLicenses).join("\n")) console.error(msg) if (process.argv.indexOf("--report") >= 0) { console.log("Writing report!") - writeFileSync("missing_licenses.txt", missingLicenses.join("\n")) + writeFileSync("missing_licenses.txt", missingLicenses.concat(invalidLicenses).join("\n")) } if (process.argv.indexOf("--no-fail") < 0) { throw msg From 972db78562355f571e5ceac8b7d84de769a7e262 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sun, 11 Apr 2021 14:15:18 +0200 Subject: [PATCH 17/31] Small clarification --- scripts/fixTheme.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/fixTheme.ts b/scripts/fixTheme.ts index 80de8a7..2cc563f 100644 --- a/scripts/fixTheme.ts +++ b/scripts/fixTheme.ts @@ -57,7 +57,13 @@ for (const replacement of replacements) { } const dir = path.substring(0, path.lastIndexOf("/")) +const fixScriptPath = dir + "/fix_script_"+path.replace(/\//g,"_")+".sh" writeFileSync(dir + "/generated.license_info.json", JSON.stringify(licenses, null, " ")) -writeFileSync(dir + "/fix_script_"+path.replace(/\//g,"_")+".sh", linuxHints.join("\n")) +writeFileSync(fixScriptPath, linuxHints.join("\n")) writeFileSync(path+".autofixed.json", fixedThemeJson) - \ No newline at end of file + +console.log(`IMPORTANT: + 1) run ${fixScriptPath} + 2) Copy generated.license_info.json over into license_info.json and add the missing attributions and authors + 3) Verify ${path}.autofixed.json as theme, and rename it to ${path} + 4) Delete the fix script and other unneeded files`) \ No newline at end of file From 986eeac65892b7aba3abd92e1984cd0fb5357d29 Mon Sep 17 00:00:00 2001 From: Win Olario Date: Sun, 11 Apr 2021 21:52:42 +0800 Subject: [PATCH 18/31] Update hailhydrant.json Update layer icons, using more consistent themes. --- assets/themes/hailhydrant/hailhydrant.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/themes/hailhydrant/hailhydrant.json b/assets/themes/hailhydrant/hailhydrant.json index 667d79d..efd198b 100644 --- a/assets/themes/hailhydrant/hailhydrant.json +++ b/assets/themes/hailhydrant/hailhydrant.json @@ -92,7 +92,7 @@ ] }, "then": { - "en": " Pillar type." + "en": " Pillar type." } }, { @@ -102,7 +102,7 @@ ] }, "then": { - "en": " Pipe type." + "en": " Pipe type." } }, { @@ -112,7 +112,7 @@ ] }, "then": { - "en": " Wall type." + "en": " Wall type." } }, { @@ -122,7 +122,7 @@ ] }, "then": { - "en": " Underground type." + "en": " Underground type." } } ] @@ -175,7 +175,7 @@ ], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "https://upload.wikimedia.org/wikipedia/commons/6/66/Hydrant_02.svg" + "render": "https://raw.githubusercontent.com/mapamore/MapComplete/master/assets/themes/hailhydrant/hydrant.svg" }, "width": { "render": "8" @@ -264,7 +264,7 @@ ], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "https://upload.wikimedia.org/wikipedia/commons/e/e8/MUTCD_RS-090.svg" + "render": "https://upload.wikimedia.org/wikipedia/commons/9/9b/Twemoji12_1f9ef.svg" }, "width": { "render": "8" @@ -419,7 +419,7 @@ ], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "https://upload.wikimedia.org/wikipedia/commons/8/84/British_Columbia_W-318-L.svg" + "render": "https://upload.wikimedia.org/wikipedia/commons/1/19/Twemoji12_1f692.svg" }, "width": { "render": "8" @@ -473,7 +473,7 @@ "tagRenderings": [], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "https://upload.wikimedia.org/wikipedia/commons/1/1e/Emojione_1F6A8.svg" + "render": "https://upload.wikimedia.org/wikipedia/commons/e/eb/Twemoji12_26d1.svg" }, "width": { "render": "8" From bda4c413644209d26cd4ee0b434cb33e3fe7f495 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sun, 11 Apr 2021 20:12:43 +0200 Subject: [PATCH 19/31] Autofixed theme --- assets/themes/hailhydrant/hailhydrant.json | 10 +++---- assets/themes/hailhydrant/license_info.json | 32 +++++++++++++++++++++ 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/assets/themes/hailhydrant/hailhydrant.json b/assets/themes/hailhydrant/hailhydrant.json index 22d55c7..41b9ac0 100644 --- a/assets/themes/hailhydrant/hailhydrant.json +++ b/assets/themes/hailhydrant/hailhydrant.json @@ -170,7 +170,7 @@ ], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "https://raw.githubusercontent.com/mapamore/MapComplete/master/assets/themes/hailhydrant/hydrant.svg" + "render": "hydrant.svg" }, "width": { "render": "8" @@ -261,7 +261,7 @@ ], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "https://upload.wikimedia.org/wikipedia/commons/9/9b/Twemoji12_1f9ef.svg" + "render": "Twemoji12_1f9ef.svg" }, "width": { "render": "8" @@ -418,7 +418,7 @@ ], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "https://upload.wikimedia.org/wikipedia/commons/1/19/Twemoji12_1f692.svg" + "render": "Twemoji12_1f692.svg" }, "width": { "render": "8" @@ -474,7 +474,7 @@ "tagRenderings": [], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "https://upload.wikimedia.org/wikipedia/commons/e/eb/Twemoji12_26d1.svg" + "render": "Twemoji12_26d1.svg" }, "width": { "render": "8" @@ -515,4 +515,4 @@ } ], "defaultBackgroundId": "HDM_HOT" -} +} \ No newline at end of file diff --git a/assets/themes/hailhydrant/license_info.json b/assets/themes/hailhydrant/license_info.json index 3e5826b..3ca9598 100644 --- a/assets/themes/hailhydrant/license_info.json +++ b/assets/themes/hailhydrant/license_info.json @@ -114,5 +114,37 @@ "sources": [ "https://upload.wikimedia.org/wikipedia/commons/1/1e/Emojione_1F6A8.svg" ] + }, + { + "path": "hydrant.svg", + "license": "", + "authors": [], + "sources": [ + "https://raw.githubusercontent.com/mapamore/MapComplete/master/assets/themes/hailhydrant/hydrant.svg" + ] + }, + { + "path": "Twemoji12_1f9ef.svg", + "license": "", + "authors": [], + "sources": [ + "https://upload.wikimedia.org/wikipedia/commons/9/9b/Twemoji12_1f9ef.svg" + ] + }, + { + "path": "Twemoji12_1f692.svg", + "license": "", + "authors": [], + "sources": [ + "https://upload.wikimedia.org/wikipedia/commons/1/19/Twemoji12_1f692.svg" + ] + }, + { + "path": "Twemoji12_26d1.svg", + "license": "", + "authors": [], + "sources": [ + "https://upload.wikimedia.org/wikipedia/commons/e/eb/Twemoji12_26d1.svg" + ] } ] \ No newline at end of file From 6dba4ea81c2b1682fa4f925e7901a50889e5070a Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sun, 11 Apr 2021 20:42:18 +0200 Subject: [PATCH 20/31] Add icons, add correct paths --- assets/themes/hailhydrant/Twemoji12_1f692.svg | 1 + assets/themes/hailhydrant/Twemoji12_1f9ef.svg | 1 + assets/themes/hailhydrant/Twemoji12_26d1.svg | 1 + assets/themes/hailhydrant/hailhydrant.json | 18 +-- assets/themes/hailhydrant/hydrant.svg.1 | 107 ++++++++++++++++++ scripts/fixTheme.ts | 5 +- 6 files changed, 122 insertions(+), 11 deletions(-) create mode 100644 assets/themes/hailhydrant/Twemoji12_1f692.svg create mode 100644 assets/themes/hailhydrant/Twemoji12_1f9ef.svg create mode 100644 assets/themes/hailhydrant/Twemoji12_26d1.svg create mode 100644 assets/themes/hailhydrant/hydrant.svg.1 diff --git a/assets/themes/hailhydrant/Twemoji12_1f692.svg b/assets/themes/hailhydrant/Twemoji12_1f692.svg new file mode 100644 index 0000000..711c996 --- /dev/null +++ b/assets/themes/hailhydrant/Twemoji12_1f692.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/themes/hailhydrant/Twemoji12_1f9ef.svg b/assets/themes/hailhydrant/Twemoji12_1f9ef.svg new file mode 100644 index 0000000..e8b17ac --- /dev/null +++ b/assets/themes/hailhydrant/Twemoji12_1f9ef.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/themes/hailhydrant/Twemoji12_26d1.svg b/assets/themes/hailhydrant/Twemoji12_26d1.svg new file mode 100644 index 0000000..e8457ae --- /dev/null +++ b/assets/themes/hailhydrant/Twemoji12_26d1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/themes/hailhydrant/hailhydrant.json b/assets/themes/hailhydrant/hailhydrant.json index 41b9ac0..916964c 100644 --- a/assets/themes/hailhydrant/hailhydrant.json +++ b/assets/themes/hailhydrant/hailhydrant.json @@ -13,7 +13,7 @@ "en" ], "maintainer": "", - "icon": "assets/themes/hailhydrant/logo.svg", + "icon": "./assets/themes/hailhydrant/logo.svg", "version": "0", "startLat": 13.67801, "startLon": 121.6625, @@ -87,7 +87,7 @@ ] }, "then": { - "en": " Pillar type." + "en": " Pillar type." } }, { @@ -97,7 +97,7 @@ ] }, "then": { - "en": " Pipe type." + "en": " Pipe type." } }, { @@ -107,7 +107,7 @@ ] }, "then": { - "en": " Wall type." + "en": " Wall type." } }, { @@ -117,7 +117,7 @@ ] }, "then": { - "en": " Underground type." + "en": " Underground type." } } ] @@ -170,7 +170,7 @@ ], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "hydrant.svg" + "render": "./assets/themes/hailhydrant/hydrant.svg" }, "width": { "render": "8" @@ -261,7 +261,7 @@ ], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "Twemoji12_1f9ef.svg" + "render": "./assets/themes/hailhydrant/Twemoji12_1f9ef.svg" }, "width": { "render": "8" @@ -418,7 +418,7 @@ ], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "Twemoji12_1f692.svg" + "render": "./assets/themes/hailhydrant/Twemoji12_1f692.svg" }, "width": { "render": "8" @@ -474,7 +474,7 @@ "tagRenderings": [], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { - "render": "Twemoji12_26d1.svg" + "render": "./assets/themes/hailhydrant/Twemoji12_26d1.svg" }, "width": { "render": "8" diff --git a/assets/themes/hailhydrant/hydrant.svg.1 b/assets/themes/hailhydrant/hydrant.svg.1 new file mode 100644 index 0000000..0dbda22 --- /dev/null +++ b/assets/themes/hailhydrant/hydrant.svg.1 @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/scripts/fixTheme.ts b/scripts/fixTheme.ts index 2cc563f..b3d0404 100644 --- a/scripts/fixTheme.ts +++ b/scripts/fixTheme.ts @@ -16,6 +16,8 @@ if(process.argv.length == 2){ } const path = process.argv[2] +const dir = path.substring(0, path.lastIndexOf("/")) + console.log("Fixing up ", path) const themeConfigJson : LayoutConfigJson = JSON.parse(readFileSync(path, "UTF8")) @@ -47,7 +49,7 @@ for (const layerConfigJson of themeConfigJson.layers) { authors: [], sources: [remoteImage] }) - replacements.push({source: remoteImage, destination: imgPath}) + replacements.push({source: remoteImage, destination: `${dir}/${imgPath}`}) } } @@ -56,7 +58,6 @@ for (const replacement of replacements) { fixedThemeJson = fixedThemeJson.replace(new RegExp(replacement.source, "g"), replacement.destination) } -const dir = path.substring(0, path.lastIndexOf("/")) const fixScriptPath = dir + "/fix_script_"+path.replace(/\//g,"_")+".sh" writeFileSync(dir + "/generated.license_info.json", JSON.stringify(licenses, null, " ")) writeFileSync(fixScriptPath, linuxHints.join("\n")) From a2ba0e9fd023b2c31603d5ab4a24fc920f4d498b Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sun, 11 Apr 2021 21:07:04 +0200 Subject: [PATCH 21/31] Remove obsolete artwork, fix licenses, fix script --- .../hailhydrant/British_Columbia_W-318-L.svg | 35 - assets/themes/hailhydrant/Emojione_1F6A8.svg | 1 - assets/themes/hailhydrant/Fire-truck.svg | 303 ---- assets/themes/hailhydrant/Hydrant_02.svg | 526 ------- assets/themes/hailhydrant/MUTCD_RS-090.svg | 90 -- .../themes/hailhydrant/blue-signal-light.svg | 115 -- assets/themes/hailhydrant/extinguisher.svg | 243 --- assets/themes/hailhydrant/fire-station-15.svg | 6 - assets/themes/hailhydrant/fire_brigade.svg | 1327 ----------------- assets/themes/hailhydrant/hydrant.svg.1 | 107 -- assets/themes/hailhydrant/license_info.json | 104 +- 11 files changed, 51 insertions(+), 2806 deletions(-) delete mode 100644 assets/themes/hailhydrant/British_Columbia_W-318-L.svg delete mode 100644 assets/themes/hailhydrant/Emojione_1F6A8.svg delete mode 100644 assets/themes/hailhydrant/Fire-truck.svg delete mode 100644 assets/themes/hailhydrant/Hydrant_02.svg delete mode 100644 assets/themes/hailhydrant/MUTCD_RS-090.svg delete mode 100644 assets/themes/hailhydrant/blue-signal-light.svg delete mode 100644 assets/themes/hailhydrant/extinguisher.svg delete mode 100644 assets/themes/hailhydrant/fire-station-15.svg delete mode 100644 assets/themes/hailhydrant/fire_brigade.svg delete mode 100644 assets/themes/hailhydrant/hydrant.svg.1 diff --git a/assets/themes/hailhydrant/British_Columbia_W-318-L.svg b/assets/themes/hailhydrant/British_Columbia_W-318-L.svg deleted file mode 100644 index 11beaf4..0000000 --- a/assets/themes/hailhydrant/British_Columbia_W-318-L.svg +++ /dev/null @@ -1,35 +0,0 @@ - -image/svg+xml - - - - - \ No newline at end of file diff --git a/assets/themes/hailhydrant/Emojione_1F6A8.svg b/assets/themes/hailhydrant/Emojione_1F6A8.svg deleted file mode 100644 index 2a00519..0000000 --- a/assets/themes/hailhydrant/Emojione_1F6A8.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/themes/hailhydrant/Fire-truck.svg b/assets/themes/hailhydrant/Fire-truck.svg deleted file mode 100644 index 767960f..0000000 --- a/assets/themes/hailhydrant/Fire-truck.svg +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - Openclipart - - - - - - - - - - - \ No newline at end of file diff --git a/assets/themes/hailhydrant/Hydrant_02.svg b/assets/themes/hailhydrant/Hydrant_02.svg deleted file mode 100644 index 257691f..0000000 --- a/assets/themes/hailhydrant/Hydrant_02.svg +++ /dev/null @@ -1,526 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/themes/hailhydrant/MUTCD_RS-090.svg b/assets/themes/hailhydrant/MUTCD_RS-090.svg deleted file mode 100644 index 21f349c..0000000 --- a/assets/themes/hailhydrant/MUTCD_RS-090.svg +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - diff --git a/assets/themes/hailhydrant/blue-signal-light.svg b/assets/themes/hailhydrant/blue-signal-light.svg deleted file mode 100644 index bcd6978..0000000 --- a/assets/themes/hailhydrant/blue-signal-light.svg +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - Openclipart - - - Blue signal light - 2013-05-10T09:38:15 - - https://openclipart.org/detail/177928/blue-signal-light-by-qubodup-177928 - - - qubodup - - - - - alarm - blue - emergency - fire brigade - fire truck - first aid - light - police - signal - siren - - - - - - - - - - - \ No newline at end of file diff --git a/assets/themes/hailhydrant/extinguisher.svg b/assets/themes/hailhydrant/extinguisher.svg deleted file mode 100644 index 79f7b2e..0000000 --- a/assets/themes/hailhydrant/extinguisher.svg +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/assets/themes/hailhydrant/fire-station-15.svg b/assets/themes/hailhydrant/fire-station-15.svg deleted file mode 100644 index 14b0c9b..0000000 --- a/assets/themes/hailhydrant/fire-station-15.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/assets/themes/hailhydrant/fire_brigade.svg b/assets/themes/hailhydrant/fire_brigade.svg deleted file mode 100644 index ad6e4fd..0000000 --- a/assets/themes/hailhydrant/fire_brigade.svg +++ /dev/null @@ -1,1327 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Fire Brigade - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/assets/themes/hailhydrant/hydrant.svg.1 b/assets/themes/hailhydrant/hydrant.svg.1 deleted file mode 100644 index 0dbda22..0000000 --- a/assets/themes/hailhydrant/hydrant.svg.1 +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/assets/themes/hailhydrant/license_info.json b/assets/themes/hailhydrant/license_info.json index 3ca9598..b7fb3a5 100644 --- a/assets/themes/hailhydrant/license_info.json +++ b/assets/themes/hailhydrant/license_info.json @@ -61,90 +61,88 @@ }, { "path": "hydrant_pillar.svg", - "license": "", - "authors": [], - "sources": [ - "https://mapcomplete.braindeaddev.com/assets/layers/fire/hydrant_pillar.svg" - ] - }, - { - "path": "hydrant_unknown.svg", - "license": "", - "authors": [], - "sources": [ - "https://mapcomplete.braindeaddev.com/assets/layers/fire/hydrant_unknown.svg" - ] - }, - { - "path": "hydrant_underground.svg", - "license": "", - "authors": [], + "license": "CC-BY-SA 4.0", + "authors": [ + "M!dgard" + ], "sources": [ + "https://www.openstreetmap.org/user/M!dgard", "https://mapcomplete.braindeaddev.com/assets/layers/fire/hydrant_underground.svg" ] }, { - "path": "Hydrant_02.svg", - "license": "", - "authors": [], + "path": "hydrant_unknown.svg", + "license": "CC-BY-SA 4.0", + "authors": [ + "M!dgard" + ], "sources": [ - "https://upload.wikimedia.org/wikipedia/commons/6/66/Hydrant_02.svg" + "https://www.openstreetmap.org/user/M!dgard", + "https://mapcomplete.braindeaddev.com/assets/layers/fire/hydrant_underground.svg" ] }, { - "path": "MUTCD_RS-090.svg", - "license": "", - "authors": [], + "path": "hydrant_underground.svg", + "license": "CC-BY-SA 4.0", + "authors": [ + "M!dgard" + ], "sources": [ - "https://upload.wikimedia.org/wikipedia/commons/e/e8/MUTCD_RS-090.svg" - ] - }, - { - "path": "British_Columbia_W-318-L.svg", - "license": "", - "authors": [], - "sources": [ - "https://upload.wikimedia.org/wikipedia/commons/8/84/British_Columbia_W-318-L.svg" - ] - }, - { - "path": "Emojione_1F6A8.svg", - "license": "", - "authors": [], - "sources": [ - "https://upload.wikimedia.org/wikipedia/commons/1/1e/Emojione_1F6A8.svg" + "https://www.openstreetmap.org/user/M!dgard", + "https://mapcomplete.braindeaddev.com/assets/layers/fire/hydrant_underground.svg" ] }, { "path": "hydrant.svg", - "license": "", - "authors": [], + "license": "CC-BY-SA 4.0", + "authors": [ + "GOwin" + ], "sources": [ "https://raw.githubusercontent.com/mapamore/MapComplete/master/assets/themes/hailhydrant/hydrant.svg" ] }, { "path": "Twemoji12_1f9ef.svg", - "license": "", - "authors": [], + "license": "CC-BY 4.0", + "authors": [ + "Twemoji Project" + ], "sources": [ - "https://upload.wikimedia.org/wikipedia/commons/9/9b/Twemoji12_1f9ef.svg" + "https://upload.wikimedia.org/wikipedia/commons/9/9b/Twemoji12_1f9ef.svg", + "https://twemoji.twitter.com/" ] }, { "path": "Twemoji12_1f692.svg", - "license": "", - "authors": [], + "license": "CC-BY 4.0", + "authors": [ + "Twemoji Project" + ], "sources": [ - "https://upload.wikimedia.org/wikipedia/commons/1/19/Twemoji12_1f692.svg" + "https://upload.wikimedia.org/wikipedia/commons/1/19/Twemoji12_1f692.svg", + "https://twemoji.twitter.com/" ] }, { "path": "Twemoji12_26d1.svg", - "license": "", - "authors": [], + "license": "CC-BY 4.0", + "authors": [ + "Twemoji Project" + ], "sources": [ - "https://upload.wikimedia.org/wikipedia/commons/e/eb/Twemoji12_26d1.svg" + "https://upload.wikimedia.org/wikipedia/commons/e/eb/Twemoji12_26d1.svg", + "https://twemoji.twitter.com/" + ] + }, + { + "authors": [ + "Erwin Olario" + ], + "path": "logo.svg", + "license": "CC-BY-SA 4.0", + "sources": [ + "https://wiki.openstreetmap.org/wiki/File:Hailhydrant-logo.svg" ] } ] \ No newline at end of file From acc09db587655ab3ed98334187119f569aad7895 Mon Sep 17 00:00:00 2001 From: Win Olario Date: Mon, 12 Apr 2021 13:15:05 +0800 Subject: [PATCH 22/31] Update hailhydrant.json Improve question text. Improve icon sizes. Add some questions for the rescue_station layer. --- assets/themes/hailhydrant/hailhydrant.json | 86 +++++++++++++++------- 1 file changed, 60 insertions(+), 26 deletions(-) diff --git a/assets/themes/hailhydrant/hailhydrant.json b/assets/themes/hailhydrant/hailhydrant.json index efd198b..c6f0c79 100644 --- a/assets/themes/hailhydrant/hailhydrant.json +++ b/assets/themes/hailhydrant/hailhydrant.json @@ -181,7 +181,7 @@ "render": "8" }, "iconSize": { - "render": "15,15,center" + "render": "20,20,center" }, "color": { "render": "#00f" @@ -317,26 +317,37 @@ "en": "Map layer to show fire stations." }, "tagRenderings": [ + { + "freeform": { + "key": "name" + }, + "question": { + "en": "What is the name of this station?" + }, + "render": { + "en": "This station is called {name}." + } + }, { "freeform": { "key": "addr:street" }, "question": { - "en": " What street is the station located?" + "en": " What is the street name where the station located?" }, "render": { - "en": "The station is along a highway called {addr:street}." + "en": "This station is along a highway called {addr:street}." } }, { "question": { - "en": "In what place is the station located? (e.g. name of neighborhood, villlage, or town)" + "en": "Where is the station located? (e.g. name of neighborhood, villlage, or town)" }, "freeform": { "key": "addr:place" }, "render": { - "en": "The station is to be found within {addr:place}." + "en": "Th isstation is to be found within {addr:place}." } }, { @@ -344,7 +355,7 @@ "en": "What agency operates this station?" }, "render": { - "en": "Operator: {operator}" + "en": "This station is operated by {operator}." }, "freeform": { "key": "operator" @@ -354,7 +365,7 @@ "if": { "and": [ "operator=Bureau of Fire Protection", - "operator:type=public" + "operator:type=government" ] }, "then": { @@ -365,10 +376,10 @@ }, { "question": { - "en": "How would you classifiy the operator of this station?" + "en": "How is the station operator classified??" }, "render": { - "en": "Operator type: {operator:type}" + "en": "The operator is a(n) {operator:type} entity." }, "freeform": { "key": "operator:type" @@ -377,21 +388,11 @@ { "if": { "and": [ - "operator:type=public" + "operator:type=government" ] }, "then": { - "en": "Public" - } - }, - { - "if": { - "and": [ - "operator:type=ngo" - ] - }, - "then": { - "en": "Volunteer" + "en": "The station is operated by the government." } }, { @@ -401,7 +402,17 @@ ] }, "then": { - "en": "Community-based, or informal organization" + "en": "The station is operated by a community-based, or informal organization." + } + }, + { + "if": { + "and": [ + "operator:type=ngo" + ] + }, + "then": { + "en": "The station is operated by a formal group of volunteers." } }, { @@ -411,7 +422,7 @@ ] }, "then": { - "en": "Private" + "en": "The station is privately operated." } } ] @@ -425,7 +436,7 @@ "render": "8" }, "iconSize": { - "render": "20,20,center" + "render": "35,35,center" }, "color": { "render": "#00f" @@ -470,7 +481,30 @@ "description": { "en": "Map layer to show rescue stations." }, - "tagRenderings": [], + "tagRenderings": [ + { + "freeform": { + "key": "image" + }, + "render": { + "en": "{all_tags()}" + }, + "question": { + "en": "Available images." + } + }, + { + "question": { + "en": "What is this service called?" + }, + "freeform": { + "key": "name" + }, + "render": { + "en": "This service is called {name}." + } + } + ], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { "render": "https://upload.wikimedia.org/wikipedia/commons/e/eb/Twemoji12_26d1.svg" @@ -479,7 +513,7 @@ "render": "8" }, "iconSize": { - "render": "20,20,center" + "render": "35,35,center" }, "color": { "render": "#00f" From 9cf8aa2c3ae5a003fba20c224b50226eb0a2c21d Mon Sep 17 00:00:00 2001 From: Win Olario Date: Mon, 12 Apr 2021 13:15:54 +0800 Subject: [PATCH 23/31] Delete Fire-truck.svg --- assets/themes/hailhydrant/Fire-truck.svg | 303 ----------------------- 1 file changed, 303 deletions(-) delete mode 100644 assets/themes/hailhydrant/Fire-truck.svg diff --git a/assets/themes/hailhydrant/Fire-truck.svg b/assets/themes/hailhydrant/Fire-truck.svg deleted file mode 100644 index 767960f..0000000 --- a/assets/themes/hailhydrant/Fire-truck.svg +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - Openclipart - - - - - - - - - - - \ No newline at end of file From f9c2373edf5a38cf8f803d0c0d32cdf4f9910407 Mon Sep 17 00:00:00 2001 From: Win Olario Date: Mon, 12 Apr 2021 13:16:28 +0800 Subject: [PATCH 24/31] Delete blue-signal-light.svg delete unused file --- .../themes/hailhydrant/blue-signal-light.svg | 115 ------------------ 1 file changed, 115 deletions(-) delete mode 100644 assets/themes/hailhydrant/blue-signal-light.svg diff --git a/assets/themes/hailhydrant/blue-signal-light.svg b/assets/themes/hailhydrant/blue-signal-light.svg deleted file mode 100644 index bcd6978..0000000 --- a/assets/themes/hailhydrant/blue-signal-light.svg +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - Openclipart - - - Blue signal light - 2013-05-10T09:38:15 - - https://openclipart.org/detail/177928/blue-signal-light-by-qubodup-177928 - - - qubodup - - - - - alarm - blue - emergency - fire brigade - fire truck - first aid - light - police - signal - siren - - - - - - - - - - - \ No newline at end of file From 564a7f3122d7af162d92e584e01e957f91fe10fa Mon Sep 17 00:00:00 2001 From: Win Olario Date: Mon, 12 Apr 2021 13:17:10 +0800 Subject: [PATCH 25/31] Delete fire_brigade.svg Remove unused file. --- assets/themes/hailhydrant/fire_brigade.svg | 1327 -------------------- 1 file changed, 1327 deletions(-) delete mode 100644 assets/themes/hailhydrant/fire_brigade.svg diff --git a/assets/themes/hailhydrant/fire_brigade.svg b/assets/themes/hailhydrant/fire_brigade.svg deleted file mode 100644 index ad6e4fd..0000000 --- a/assets/themes/hailhydrant/fire_brigade.svg +++ /dev/null @@ -1,1327 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Fire Brigade - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 3930e73e2c20106e21ecb805c3ef898f2fc6ecd7 Mon Sep 17 00:00:00 2001 From: Win Olario Date: Mon, 12 Apr 2021 13:23:34 +0800 Subject: [PATCH 26/31] wemoji12_26d1.svg Add icon for rescue_station --- assets/themes/hailhydrant/Twemoji12_26d1.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 assets/themes/hailhydrant/Twemoji12_26d1.svg diff --git a/assets/themes/hailhydrant/Twemoji12_26d1.svg b/assets/themes/hailhydrant/Twemoji12_26d1.svg new file mode 100644 index 0000000..e8457ae --- /dev/null +++ b/assets/themes/hailhydrant/Twemoji12_26d1.svg @@ -0,0 +1 @@ + \ No newline at end of file From 0d15d8b904a33e0c0fb345559c16d896fda2260a Mon Sep 17 00:00:00 2001 From: Win Olario Date: Mon, 12 Apr 2021 14:29:07 +0800 Subject: [PATCH 27/31] Twemoji12_1f692.svg add icon for the fire station layer --- assets/themes/hailhydrant/Twemoji12_1f692.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 assets/themes/hailhydrant/Twemoji12_1f692.svg diff --git a/assets/themes/hailhydrant/Twemoji12_1f692.svg b/assets/themes/hailhydrant/Twemoji12_1f692.svg new file mode 100644 index 0000000..711c996 --- /dev/null +++ b/assets/themes/hailhydrant/Twemoji12_1f692.svg @@ -0,0 +1 @@ + \ No newline at end of file From 6798fda712b557f0bff45cbea8be3f979da8798d Mon Sep 17 00:00:00 2001 From: Win Olario Date: Mon, 12 Apr 2021 14:33:16 +0800 Subject: [PATCH 28/31] Add icon for extinguisher layer --- assets/themes/hailhydrant/Twemoji12_1f9ef.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 assets/themes/hailhydrant/Twemoji12_1f9ef.svg diff --git a/assets/themes/hailhydrant/Twemoji12_1f9ef.svg b/assets/themes/hailhydrant/Twemoji12_1f9ef.svg new file mode 100644 index 0000000..e8b17ac --- /dev/null +++ b/assets/themes/hailhydrant/Twemoji12_1f9ef.svg @@ -0,0 +1 @@ + \ No newline at end of file From 8ee292d24f34d33b5404d5a4c71651f0b873369a Mon Sep 17 00:00:00 2001 From: Win Olario Date: Mon, 12 Apr 2021 14:57:22 +0800 Subject: [PATCH 29/31] Add image to all layers --- assets/themes/hailhydrant/hailhydrant.json | 560 ++++++++++++++++++++- 1 file changed, 542 insertions(+), 18 deletions(-) diff --git a/assets/themes/hailhydrant/hailhydrant.json b/assets/themes/hailhydrant/hailhydrant.json index c6f0c79..e63d4b1 100644 --- a/assets/themes/hailhydrant/hailhydrant.json +++ b/assets/themes/hailhydrant/hailhydrant.json @@ -1,547 +1,1071 @@ { + "id": "hailhydrant", + "title": { + "en": "Hydrants, Extinguishers, Fire stations, and Rescue stations." + }, + "shortDescription": { + "en": "Map to show hydrants, extinguishers, fire stations, and rescue stations." + }, + "description": { + "en": "On this map you can find and update hydrants, fire stations, rescue stations, and extinguishers in your favorite neighborhoods. \n\nYou can track your precise location (mobile only) and select layers that are relevant for you in the bottom left corner. You can also use this tool to add or edit pins (points of interest) to the map and provide additional details by answering available questions. \n\nAll changes you make will automatically be saved in the global database of OpenStreetMap and can be freely re-used by others." + }, + "language": [ + "en" + ], + "maintainer": "", + "icon": "assets/themes/hailhydrant/logo.svg", + "version": "0", + "startLat": 13.67801, + "startLon": 121.6625, + "startZoom": 6, + "widenFactor": 0.05, + "socialImage": "", + "layers": [ + { + "id": "hydrants", + "name": { + "en": "Map of hydrants" + }, + "minzoom": 14, + "overpassTags": { + "and": [ + "emergency=fire_hydrant" + ] + }, + "title": { + "render": { + "en": "Hydrant" + } + }, + "description": { + "en": "Map layer to show fire hydrants." + }, + "tagRenderings": [ +"images", { + "question": { + "en": "What color is the hydrant?" + }, + "render": { + "en": "The hydrant color is {colour}" + }, + "freeform": { + "key": "colour" + }, + "mappings": [ + { + "if": { + "and": [ + "colour=yellow" + ] + }, + "then": { + "en": "The hydrant color is yellow." + } + }, + { + "if": { + "and": [ + "colour=red" + ] + }, + "then": { + "en": "The hydrant color is red." + } + } + ] + }, + { + "question": { + "en": "What type of hydrant is it?" + }, + "freeform": { + "key": "fire_hydrant:type" + }, + "render": { + "en": " Hydrant type: {fire_hydrant:type}" + }, + "mappings": [ + { + "if": { + "and": [ + "fire_hydrant:type=pillar" + ] + }, + "then": { + "en": " Pillar type." + } + }, + { + "if": { + "and": [ + "fire_hydrant:type=pipe" + ] + }, + "then": { + "en": " Pipe type." + } + }, + { + "if": { + "and": [ + "fire_hydrant:type=wall" + ] + }, + "then": { + "en": " Wall type." + } + }, + { + "if": { + "and": [ + "fire_hydrant:type=underground" + ] + }, + "then": { + "en": " Underground type." + } + } + ] + }, + { + "question": { + "en": "Update the lifecycle status of the hydrant." + }, + "render": { + "en": "Lifecycle status" + }, + "freeform": { + "key": "disused:emergency" + }, + "mappings": [ + { + "if": { + "and": [ + "emergency=fire_hydrant" + ] + }, + "then": { + "en": "The hydrant is (fully or partially) working." + } + }, + { + "if": { + "and": [ + "disused:emergency=fire_hydrant", + "emergency=" + ] + }, + "then": { + "en": "The hydrant is unavailable." + } + }, + { + "if": { + "and": [ + "removed:emergency=fire_hydrant", + "emergency=" + ] + }, + "then": { + "en": "The hydrant has been removed." + } + } + ] + } + ], + "hideUnderlayingFeaturesMinPercentage": 0, + "icon": { + "render": "https://raw.githubusercontent.com/mapamore/MapComplete/master/assets/themes/hailhydrant/hydrant.svg" + }, + "width": { + "render": "8" + }, + "iconSize": { + "render": "20,20,center" + }, + "color": { + "render": "#00f" + }, + "presets": [ + { + "tags": [ + "emergency=fire_hydrant" + ], + "title": { + "en": "Fire hydrant" + }, + "description": { + "en": "Add a new fire hydrant to the map." + } + } + ], + "wayHandling": 1, + "osmSource": { + "overpassTags": { + "and": [ + "emergency=fire_hydrant" + ] + } + } + }, + { + "id": "extinguisher", + "name": { + "en": "Map of fire extinguishers." + }, + "minzoom": 14, + "overpassTags": { + "and": [ + "emergency=fire_extinguisher" + ] + }, + "title": { + "render": { + "en": "Extinguishers" + } + }, + "description": { + "en": "Map layer to show fire hydrants." + }, + "tagRenderings": [ +"images", { + "render": { + "en": "Location: {location}" + }, + "question": { + "en": "Where is it positioned?" + }, + "mappings": [ + { + "if": { + "and": [ + "location=indoor" + ] + }, + "then": { + "en": "Found indoors." + } + }, + { + "if": { + "and": [ + "location=outdoor" + ] + }, + "then": { + "en": "Found outdoors." + } + } + ], + "freeform": { + "key": "location" + } + } + ], + "hideUnderlayingFeaturesMinPercentage": 0, + "icon": { - "render": "https://upload.wikimedia.org/wikipedia/commons/9/9b/Twemoji12_1f9ef.svg" + + "render": "https://raw.githubusercontent.com/mapamore/MapComplete/master/assets/themes/hailhydrant/Twemoji12_1f9ef.svg" + }, + "width": { + "render": "8" + }, + "iconSize": { + "render": "20,20,center" + }, + "color": { + "render": "#00f" + }, + "presets": [ + { + "tags": [ + "emergency=fire_extinguisher" + ], + "title": { + "en": "Fire extinguisher" + }, + "description": { + "en": "Add a fire extinguisher to the map" + } + } + ], + "wayHandling": 1, + "osmSource": { + "overpassTags": { + "and": [ + "emergency=fire_extinguisher" + ] + } + } + }, + { + "id": "stations", + "name": { + "en": "Map of fire stations" + }, + "minzoom": 12, + "overpassTags": { + "and": [ + "amenity=fire_station" + ] + }, + "title": { + "render": { + "en": "Fire Station" + } + }, + "description": { + "en": "Map layer to show fire stations." + }, + "tagRenderings": [ +"images", { + "freeform": { + "key": "name" + }, + "question": { + "en": "What is the name of this station?" + }, + "render": { + "en": "This station is called {name}." + } + }, + { + "freeform": { + "key": "addr:street" + }, + "question": { + "en": " What is the street name where the station located?" + }, + "render": { + "en": "This station is along a highway called {addr:street}." + } + }, + { + "question": { + "en": "Where is the station located? (e.g. name of neighborhood, villlage, or town)" + }, + "freeform": { + "key": "addr:place" + }, + "render": { + "en": "Th isstation is to be found within {addr:place}." + } + }, + { + "question": { + "en": "What agency operates this station?" + }, + "render": { + "en": "This station is operated by {operator}." + }, + "freeform": { + "key": "operator" + }, + "mappings": [ + { + "if": { + "and": [ + "operator=Bureau of Fire Protection", + "operator:type=government" + ] + }, + "then": { + "en": "Bureau of Fire Protection" + } + } + ] + }, + { + "question": { + "en": "How is the station operator classified??" + }, + "render": { + "en": "The operator is a(n) {operator:type} entity." + }, + "freeform": { + "key": "operator:type" + }, + "mappings": [ + { + "if": { + "and": [ + "operator:type=government" + ] + }, + "then": { + "en": "The station is operated by the government." + } + }, + { + "if": { + "and": [ + "operator:type=community" + ] + }, + "then": { + "en": "The station is operated by a community-based, or informal organization." + } + }, + { + "if": { + "and": [ + "operator:type=ngo" + ] + }, + "then": { + "en": "The station is operated by a formal group of volunteers." + } + }, + { + "if": { + "and": [ + "operator:type=private" + ] + }, + "then": { + "en": "The station is privately operated." + } + } + ] + } + ], + "hideUnderlayingFeaturesMinPercentage": 0, + "icon": { - "render": "https://upload.wikimedia.org/wikipedia/commons/1/19/Twemoji12_1f692.svg" + + "render": "https://raw.githubusercontent.com/mapamore/MapComplete/master/assets/themes/hailhydrant/Twemoji12_1f692.svg" + }, + "width": { + "render": "8" + }, + "iconSize": { + "render": "35,35,center" + }, + "color": { + "render": "#00f" + }, + "presets": [ + { + "tags": [ + "amenity=fire_station" + ], + "title": { - "en": "fire station" + + "en": "Fire station" + }, + "description": { + "en": "Add a fire station to the map." + } + } + ], + "osmSource": { + "overpassTags": { + "and": [ + "amenity=fire_station" + ] + } + } + }, + { + "id": "rescuestation", + "name": { + "en": "Map of rescue stations" + }, + "minzoom": 12, + "overpassTags": { + "and": [ + "amenity=rescue_station" + ] + }, + "title": { + "render": { + "en": "Rescue Station" + } + }, + "description": { + "en": "Map layer to show rescue stations." + }, + "tagRenderings": [ +"images", { - "freeform": { - "key": "image" - }, - "render": { - "en": "{all_tags()}" - }, + "question": { - "en": "Available images." - } - }, - { - "question": { - "en": "What is this service called?" + + "en": "What is this entity called?" + }, + "freeform": { + "key": "name" + }, + "render": { - "en": "This service is called {name}." + + "en": "This entity is called {name}." + } + } + ], + "hideUnderlayingFeaturesMinPercentage": 0, + "icon": { - "render": "https://upload.wikimedia.org/wikipedia/commons/e/eb/Twemoji12_26d1.svg" + + "render": "https://raw.githubusercontent.com/mapamore/MapComplete/master/assets/themes/hailhydrant/Twemoji12_26d1.svg" + }, + "width": { + "render": "8" + }, + "iconSize": { + "render": "35,35,center" + }, + "color": { + "render": "#00f" + }, + "presets": [ + { + "tags": [ + "amenity=rescue_station" + ], + "title": { - "en": "rescue station" + + "en": "Rescue station" + }, + "description": { + "en": "Add a rescue or emergency service station to the map" + } + } + ], + "osmSource": { + "overpassTags": { + "and": [ + "amenity=rescue_station" + ] + } + } + } + ], + "roamingRenderings": [ + {} + ], + "defaultBackgroundId": "HDM_HOT" + } From 70f2f0aa74d6bb610925e6986dd5c789b55ff898 Mon Sep 17 00:00:00 2001 From: Win Olario Date: Mon, 12 Apr 2021 15:05:43 +0800 Subject: [PATCH 30/31] Update license_info.json entries --- assets/themes/hailhydrant/license_info.json | 46 +++++++-------------- 1 file changed, 15 insertions(+), 31 deletions(-) diff --git a/assets/themes/hailhydrant/license_info.json b/assets/themes/hailhydrant/license_info.json index eec8d11..097c742 100644 --- a/assets/themes/hailhydrant/license_info.json +++ b/assets/themes/hailhydrant/license_info.json @@ -1,13 +1,5 @@ [ { - "authors": ["https://openclipart.org/artist/rones"], - "path": "extinguisher.svg", - "license": "CC0", - "sources": [ - "https://openclipart.org/detail/315876/fire-extinguisher" - ] - }, - { "authors": ["http://jaanos.deviantart.com/"], "path": "hydrant.svg", "license": "GPL", @@ -15,36 +7,28 @@ "https://commons.wikimedia.org/wiki/File:Hydrant.svg" ] }, - { - "authors": ["https://openclipart.org/artist/TVLuke"], - "path": "fire_brigade.svg", - "license": "CC0", + { + "authors": ["https://twemoji.twitter.com/"], + "path": "Twemoji12_1f9ef.svg", + "license": "CC-BY", "sources": [ - "https://openclipart.org/detail/318142/fire-brigade" + "https://commons.wikimedia.org/wiki/File:Twemoji12_1f9ef.svg" ] }, - { - "authors": ["https://openclipart.org/artist/qubodup"], - "path": "blue-signal-light.svg", - "license": "CC0", + { + "authors": ["https://twemoji.twitter.com/"], + "path": "Twemoji12_1f692.svg", + "license": "CC-BY", "sources": [ - "https://openclipart.org/detail/177928/blue-signal-light" + "https://commons.wikimedia.org/wiki/File:Twemoji12_1f692.svg" ] }, - { - "authors": ["https://www.mapbox.com/maki-icons/"], - "path": "fire-station-15.svg", - "license": "CC0", + { + "authors": ["https://twemoji.twitter.com/"], + "path": "Twemoji12_26d1.svg", + "license": "CC-BY", "sources": [ - "https://openclipart.org/detail/260728/firestation15" - ] - }, - { - "authors": ["https://openclipart.org/artist/rdevries"], - "path": "Fire-truck.svg", - "license": "CC0", - "sources": [ - "https://openclipart.org/detail/190874/fire-truck" + "https://commons.wikimedia.org/wiki/File:Twemoji12_26d1.svg" ] } ] From 765f3d5e8065169441c6f7c220ea902dd0731d44 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Mon, 12 Apr 2021 16:54:53 +0200 Subject: [PATCH 31/31] Last small fixes to hailhydrant theme --- assets/themes/hailhydrant/hailhydrant.json | 92 +++++++++------------ assets/themes/hailhydrant/license_info.json | 6 +- 2 files changed, 38 insertions(+), 60 deletions(-) diff --git a/assets/themes/hailhydrant/hailhydrant.json b/assets/themes/hailhydrant/hailhydrant.json index aa186fb..ca17c2b 100644 --- a/assets/themes/hailhydrant/hailhydrant.json +++ b/assets/themes/hailhydrant/hailhydrant.json @@ -27,10 +27,12 @@ "en": "Map of hydrants" }, "minzoom": 14, - "overpassTags": { - "and": [ - "emergency=fire_hydrant" - ] + "source": { + "osmTags": { + "and": [ + "emergency=fire_hydrant" + ] + } }, "title": { "render": { @@ -196,18 +198,11 @@ "en": "Fire hydrant" }, "description": { - "en": "Add a new fire hydrant to the map." + "en": "A hydrant is a connection point where firefighters can tap water. It might be located underground." } } ], - "wayHandling": 1, - "osmSource": { - "overpassTags": { - "and": [ - "emergency=fire_hydrant" - ] - } - } + "wayHandling": 2 }, { "id": "extinguisher", @@ -215,10 +210,12 @@ "en": "Map of fire extinguishers." }, "minzoom": 14, - "overpassTags": { - "and": [ - "emergency=fire_extinguisher" - ] + "source": { + "osmTags": { + "and": [ + "emergency=fire_extinguisher" + ] + } }, "title": { "render": { @@ -286,30 +283,26 @@ "en": "Fire extinguisher" }, "description": { - "en": "Add a fire extinguisher to the map" + "en": "A fire extinguisher is a small, portable device used to stop a fire" } } ], - "wayHandling": 1, - "osmSource": { - "overpassTags": { - "and": [ - "emergency=fire_extinguisher" - ] - } - } + "wayHandling": 1 }, { - "id": "stations", + "id": "fire_stations", "name": { "en": "Map of fire stations" }, "minzoom": 12, - "overpassTags": { - "and": [ - "amenity=fire_station" - ] + "source": { + "osmTags": { + "and": [ + "amenity=fire_station" + ] + } }, + "wayHandling": 2, "title": { "render": { "en": "Fire Station" @@ -436,13 +429,13 @@ "render": "./assets/themes/hailhydrant/Twemoji12_1f692.svg" }, "width": { - "render": "8" + "render": "1" }, "iconSize": { "render": "35,35,center" }, "color": { - "render": "#00f" + "render": "#c22" }, "presets": [ { @@ -453,17 +446,10 @@ "en": "Fire station" }, "description": { - "en": "Add a fire station to the map." + "en": "A fire station is a place where the fire trucks and firefighters are located when not in operation." } } - ], - "osmSource": { - "overpassTags": { - "and": [ - "amenity=fire_station" - ] - } - } + ] }, { "id": "rescuestation", @@ -471,10 +457,12 @@ "en": "Map of rescue stations" }, "minzoom": 12, - "overpassTags": { - "and": [ - "amenity=rescue_station" - ] + "source": { + "osmTags": { + "and": [ + "amenity=rescue_station" + ] + } }, "title": { "render": { @@ -503,7 +491,7 @@ "render": "./assets/themes/hailhydrant/Twemoji12_26d1.svg" }, "width": { - "render": "8" + "render": "1" }, "iconSize": { "render": "35,35,center" @@ -511,7 +499,7 @@ "color": { "render": "#00f" }, - "presets": [ + "presets-disabled": [ { "tags": [ "amenity=rescue_station" @@ -524,13 +512,7 @@ } } ], - "osmSource": { - "overpassTags": { - "and": [ - "amenity=rescue_station" - ] - } - } + "wayHandling": 2 } ], "defaultBackgroundId": "HDM_HOT" diff --git a/assets/themes/hailhydrant/license_info.json b/assets/themes/hailhydrant/license_info.json index 57cac7e..9a4186f 100644 --- a/assets/themes/hailhydrant/license_info.json +++ b/assets/themes/hailhydrant/license_info.json @@ -11,13 +11,10 @@ }, { "authors": [ - "https://twemoji.twitter.com/" + "Twemoji Project" ], "path": "Twemoji12_1f9ef.svg", "license": "CC-BY 4.0", - "authors": [ - "Twemoji Project" - ], "sources": [ "https://upload.wikimedia.org/wikipedia/commons/9/9b/Twemoji12_1f9ef.svg", "https://twemoji.twitter.com/" @@ -66,7 +63,6 @@ "https://raw.githubusercontent.com/mapamore/MapComplete/master/assets/themes/hailhydrant/hydrant.svg" ] }, - { "path": "Twemoji12_1f692.svg", "license": "CC-BY 4.0",