diff --git a/Docs/Making_Your_Own_Theme.md b/Docs/Making_Your_Own_Theme.md index 6483f4963..a16889da0 100644 --- a/Docs/Making_Your_Own_Theme.md +++ b/Docs/Making_Your_Own_Theme.md @@ -294,9 +294,9 @@ There are three important levels in the JSON file: Every field is documented in the source code itself - you can find them here: -- [The top level `LayoutConfig`](/Models/ThemeConfig/Json/LayoutConfigJson.ts) -- [A layer object `LayerConfig`](/Models/ThemeConfig/Json/LayerConfigJson.ts) -- [The `TagRendering`](/Models/ThemeConfig/Json/TagRenderingConfigJson.ts) +- [The top level `LayoutConfig`](/src/Models/ThemeConfig/Json/LayoutConfigJson.ts) +- [A layer object `LayerConfig`](/src/Models/ThemeConfig/Json/LayerConfigJson.ts) +- [The `TagRendering`](/src/Models/ThemeConfig/Json/TagRenderingConfigJson.ts) - At last, the exact semantics of tags are documented [here](Tags_format.md) A JSON schema file is available in `Docs/Schemas` - use `LayoutConfig.schema.json` to validate a theme file. diff --git a/assets/themes/disaster_response/CivilDefence.svg b/assets/themes/disaster_response/CivilDefence.svg new file mode 100644 index 000000000..3cfd38176 --- /dev/null +++ b/assets/themes/disaster_response/CivilDefence.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/assets/themes/disaster_response/assembly_point.svg b/assets/themes/disaster_response/assembly_point.svg new file mode 100644 index 000000000..2ff9f9a78 --- /dev/null +++ b/assets/themes/disaster_response/assembly_point.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/themes/disaster_response/disaster_response.json b/assets/themes/disaster_response/disaster_response.json new file mode 100644 index 000000000..0f75f0359 --- /dev/null +++ b/assets/themes/disaster_response/disaster_response.json @@ -0,0 +1,203 @@ +{ + "description": { + "en": "This theme contains elements meant for disaster risk reduction and response.", + "it": "Questo tema contiene elementi pensati per la riduzione del rischio e per la risposta ai disastri." + }, + "extraLink": { + "href": "https://wiki.openstreetmap.org/wiki/Emergency_facilities_and_amenities" + }, + "icon": "./assets/themes/disaster_response/CivilDefence.svg", + "id": "disaster_response", + "socialImage": "./assets/themes/disaster_response/social.jpg", + "title": { + "en": "Disaster response", + "it": "Risposta ai disastri" + }, + "layers": [ + "hospital", + { + "id": "disaster_response", + "title": "Disaster response", + "description": "This layer contains organizations that has the main objective to help the civil population during and after natural or anthropogenic disasters by working in the affected area", + "extraLink": { + "href": "https://wiki.openstreetmap.org/wiki/Tag:emergency%3Ddisaster_response" + }, + "source": { + "osmTags": { + "and": [ + "emergency=disaster_response" + ] + } + }, + "minzoom": 10, + "lineRendering": [ + { + "color": "#6BC4F7", + "width": 3 + } + ], + "pointRendering": [ + { + "iconSize": "40,40", + "location": [ + "point", + "centroid" + ], + "anchor": "bottom", + "marker": [ + { + "icon": "pin", + "color": "#6BC4F7" + }, + { + "icon": "./assets/themes/disaster_response/CivilDefence.svg" + } + ] + } + ], + "tagRenderings": [ + "images", + "website" + ] + }, + { + "id": "assembly_point", + "title": { + "en": "Emergency assembly points", + "it": "Aree di attesa per emergenze" + }, + "description": "This layer contains designated places or an area where all employees, passengers or a large crowd assemble in case of an emergency in an installation, building or a public place.", + "extraLink": { + "href": "https://wiki.openstreetmap.org/wiki/Tag:emergency%3Dassembly_point" + }, + "source": { + "osmTags": { + "and": [ + "emergency=assembly_point" + ] + } + }, + "minzoom": 10, + "pointRendering": [ + { + "iconSize": "20,20", + "location": [ + "point", + "centroid" + ], + "anchor": "bottom", + "marker": [ + { + "icon": "pin", + "color": "#6BC4F7" + }, + { + "icon": "./assets/themes/disaster_response/assembly_point.svg" + } + ] + } + ], + "tagRenderings": [ + "images", + { + "id": "operator", + "render": { + "en": "This assembly point is operated by {operator}", + "it": "Questa area di attesa è gestita da {operator}" + }, + "question": { + "en": "What organization operates this assembly point?", + "it": "Quale organizzazione gestisce questa area di attesa?" + }, + "freeform": { + "key": "operator", + "type": "string" + } + }, + { + "id": "disaster_type", + "question": { + "en": "For which disaster type is this assembly point meant?", + "it": "Per quali tipi di disastro è pensata questa area di attesa?" + }, + "multiAnswer": true, + "mappings": [ + { + "if": "assembly_point:earthquake=yes", + "ifnot": "assembly_point:earthquake=", + "then": { + "en": "Earthquake", + "it": "Terremoto" + }, + "icon": { + "path": "./assets/themes/disaster_response/earthquake.svg", + "class": "medium" + } + }, + { + "if": "assembly_point:flood=yes", + "ifnot": "assembly_point:flood=", + "then": { + "en": "Flood", + "it": "Alluvione" + }, + "icon": { + "path": "./assets/themes/disaster_response/flood.svg", + "class": "medium" + } + }, + { + "if": "assembly_point:fire=yes", + "ifnot": "assembly_point:fire=", + "then": { + "en": "Fire", + "it": "Incendio" + }, + "icon": { + "path": "./assets/themes/disaster_response/fire.svg", + "class": "medium" + } + } + ] + } + ] + }, + { + "id": "ses_station", + "title": "SES station", + "description": "This layer contains stations of State Emergency Service (SES), an Australian volunteer organisation that provides emergency help during and after declared (natural or otherwise) disasters.", + "documentation": "https://wiki.openstreetmap.org/wiki/Tag%3Aemergency%3Dses_station", + "source": { + "osmTags": { + "and": [ + "emergency=ses_station" + ] + } + }, + "minzoom": 10, + "pointRendering": [ + { + "iconSize": "40,40", + "location": [ + "point", + "centroid" + ], + "anchor": "bottom", + "marker": [ + { + "icon": "pin", + "color": "#6BC4F7" + }, + { + "icon": "./assets/themes/disaster_response/CivilDefence.svg" + } + ] + } + ], + "tagRenderings": [ + "images", + "website" + ] + } + ] +} \ No newline at end of file diff --git a/assets/themes/disaster_response/earthquake.svg b/assets/themes/disaster_response/earthquake.svg new file mode 100644 index 000000000..6eadce2e5 --- /dev/null +++ b/assets/themes/disaster_response/earthquake.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/assets/themes/disaster_response/fire.svg b/assets/themes/disaster_response/fire.svg new file mode 100644 index 000000000..462c29956 --- /dev/null +++ b/assets/themes/disaster_response/fire.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/themes/disaster_response/flood.svg b/assets/themes/disaster_response/flood.svg new file mode 100644 index 000000000..6d041fe97 --- /dev/null +++ b/assets/themes/disaster_response/flood.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/assets/themes/disaster_response/license_info.json b/assets/themes/disaster_response/license_info.json new file mode 100644 index 000000000..d32f23c09 --- /dev/null +++ b/assets/themes/disaster_response/license_info.json @@ -0,0 +1,76 @@ +[ + { + "path": "CivilDefence.svg", + "license": "TRIVIAL", + "authors": [ + "https://commons.wikimedia.org/wiki/User:MStankie" + ], + "sources": [ + "https://commons.wikimedia.org/wiki/File:CivilDefence.svg" + ] + }, + { + "path": "assembly_point.svg", + "license": "CC0-1.0", + "authors": [ + "https://commons.wikimedia.org/wiki/User:Epop" + ], + "sources": [ + "https://commons.wikimedia.org/wiki/File:E011.svg" + ] + }, + { + "path": "earthquake.svg", + "license": "CC0-1.0", + "authors": [ + "United Nations Office for the Coordination of Humanitarian Affairs (OCHA)" + ], + "sources": [ + "https://thenounproject.com/icon/fire-4232/", + "https://commons.wikimedia.org/wiki/File:Earthquake_-_The_Noun_Project.svg" + ] + }, + { + "path": "fire.svg", + "license": "CC0-1.0", + "authors": [ + "United Nations Office for the Coordination of Humanitarian Affairs (OCHA)" + ], + "sources": [ + "https://thenounproject.com/icon/fire-4234/", + "https://commons.wikimedia.org/wiki/File:Fire_-_The_Noun_Project.svg" + ] + }, + { + "path": "flood.svg", + "license": "CC0-1.0", + "authors": [ + "Iconathon" + ], + "sources": [ + "https://thenounproject.com/icon/flood-752/", + "https://commons.wikimedia.org/wiki/File:Flood_(752)_-_The_Noun_Project.svg" + ] + }, + { + "path": "landslide.svg", + "license": "CC-BY-3.0", + "authors": [ + "Development Seed" + ], + "sources": [ + "https://github.com/developmentseed/mapbox/blob/master/icons-maki/maki-icons.svg", + "https://commons.wikimedia.org/wiki/File:Maki1-landslide-15.svg" + ] + }, + { + "path": "social.jpg", + "license": "CC0-1.0", + "authors": [ + "United States Agency for International Development" + ], + "sources": [ + "https://commons.wikimedia.org/wiki/File:A_commune_level_disaster_response_drill_(27239207134).jpg" + ] + } +] \ No newline at end of file diff --git a/assets/themes/disaster_response/social.jpg b/assets/themes/disaster_response/social.jpg new file mode 100644 index 000000000..4001b00b6 Binary files /dev/null and b/assets/themes/disaster_response/social.jpg differ