Merge branch 'develop' into RobinLinde-patch-1

This commit is contained in:
Robin van der Linde 2024-02-10 23:18:36 +01:00
commit 7d2fa876e3
Signed by untrusted user: Robin-van-der-Linde
GPG key ID: 53956B3252478F0D
40 changed files with 684 additions and 27 deletions

View file

@ -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.

View file

@ -106,6 +106,34 @@
}
]
},
{
"id": "duration",
"question": {
"en": "How long takes a single journey with this elevator?"
},
"questionHint": {
"en": "This excludes the waiting time."
},
"freeform": {
"key": "duration"
},
"render": {
"en": "A single journey takes {duration} minutes"
}
},
{
"id": "occupancy",
"freeform": {
"key": "aerialway:occupancy"
},
"question": {
"en": "How many people fit a single carriage?"
},
"render": {
"en": "{aerialway:occupancy} people fit a single carriage"
}
},
"opening_hours",
{
"id": "length",
"render": {

View file

@ -0,0 +1,145 @@
{
"allowMove": {
"enableRelocation": false,
"enableImproveAccuracy": true
},
"name": {
"en": "Emergency assembly points",
"it": "Punti di raccolta per emergenze"
},
"description": {
"en": "This layer contains assembly points and waiting areas where all employees, passengers or a large crowd assemble in case of an emergency.",
"it": "Questo livello contiene punti di raccolta e aree di attesa in cui tutti i dipendenti, i passeggeri o una grande folla si riuniscono in caso di emergenza."
},
"docs": "https://wiki.openstreetmap.org/wiki/Tag:emergency%3Dassembly_point",
"id": "assembly_point",
"minzoom": 10,
"source": {
"osmTags": {
"and": [
"emergency=assembly_point"
]
}
},
"pointRendering": [
{
"iconSize": "20,20",
"location": [
"point",
"centroid"
],
"anchor": "bottom",
"marker": [
{
"icon": "./assets/layers/assembly_point/assembly_point.svg"
}
]
}
],
"presets": [
{
"title": {
"en": "an assembly point",
"it": "un punto di raccolta"
},
"tags": [
"emergency=assembly_point"
]
}
],
"title": {
"render": {
"en": "Assembly point during emergencies"
}
},
"tagRenderings": [
"images",
{
"id": "assembly_point_name",
"freeform": {
"key": "name"
},
"question": {
"en": "What is the name of this assembly point?",
"it": "Qual è il nome di questo punto di raccolta?"
},
"render": {
"en": "This assembly point is named <b>{name}</b>",
"it": "Questo punto di raccolta si chiama <b>{name}</b>"
}
},
{
"id": "assembly_point_operator",
"render": {
"en": "This assembly point is operated by <b>{operator}</b>",
"it": "Questo punto di raccolta è gestita da <b>{operator}</b>"
},
"question": {
"en": "What organization operates this assembly point?",
"it": "Quale organizzazione gestisce questo punto di raccolta?"
},
"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 è pensato questo punto di raccolta?"
},
"multiAnswer": true,
"mappings": [
{
"if": "assembly_point:earthquake=yes",
"ifnot": "assembly_point:earthquake=",
"then": {
"en": "Earthquake",
"it": "Terremoto"
},
"icon": {
"path": "./assets/layers/assembly_point/earthquake.svg",
"class": "medium"
}
},
{
"if": "assembly_point:flood=yes",
"ifnot": "assembly_point:flood=",
"then": {
"en": "Flood",
"it": "Alluvione"
},
"icon": {
"path": "./assets/layers/assembly_point/flood.svg",
"class": "medium"
}
},
{
"if": "assembly_point:fire=yes",
"ifnot": "assembly_point:fire=",
"then": {
"en": "Fire",
"it": "Incendio"
},
"icon": {
"path": "./assets/layers/assembly_point/fire.svg",
"class": "medium"
}
},
{
"if": "assembly_point:landslide=yes",
"ifnot": "assembly_point:landslide=",
"then": {
"en": "Landslide",
"it": "Frana"
},
"icon": {
"path": "./assets/layers/assembly_point/landslide.svg",
"class": "medium"
}
}
]
}
]
}

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1"
width="400px" height="400px" viewBox="0 0 178 178" id="svg2">
<defs />
<rect width="178" height="178" x="0" y="0" style="fill:#ffffff" />
<rect width="168" height="168" x="5" y="5" style="fill:#008855;fill-rule:evenodd" />
<g style="fill:#ffffff;fill-rule:evenodd">
<path
d="M 44.9,117.94 44.9,88.84 C 44.9,86.32 47.1,84.64 49.4,84.64 H 76.7 C 76.6,88.08 79,90.5 80.9,93.04 H 74 C 69,93.04 66.5,96.15 66.5,101.74 V 117.94 H 56.9 V 96.04 H 52.7 V 117.94 z M 70.7,127.84 70.7,101.44 C 70.7,98.41 72.7,96.94 75.5,96.94 H 102.5 C 105.8,96.94 107.3,99.73 107.3,101.14 V 127.84 H 101.6 V 106.54 H 97.4 V 127.84 H 80.9 V 106.54 H 76.4 V 127.84 z M 133.1,117.94 133.1,90.04 C 133.1,86.99 131.5,84.64 128.6,84.64 H 101.3 C 101.3,87.95 99,90.54 97.1,93.04 H 103.7 C 108.4,93.04 111.5,97.12 111.5,101.74 V 117.94 H 121.1 V 96.04 H 125.3 V 117.94 z" />
<path d="M 97.86,58.49 A 8.855,8.855 0 0 1 80.15,58.49 8.855,8.855 0 1 1 97.86,58.49 z" />
<path
d="M 122.54,71.069 A 8.8551,8.8551 0 0 1 104.83,71.069 8.8551,8.8551 0 1 1 122.54,71.069 z" />
<path
d="M 72.283,70.693 A 8.8551,8.8551 0 0 1 54.573,70.693 8.8551,8.8551 0 1 1 72.283,70.693 z" />
<path
d="M 97.702,83.413 A 8.8551,8.8551 0 0 1 79.992,83.413 8.8551,8.8551 0 1 1 97.702,83.413 z" />
<path
d="M 14.761,8.9 8.9,14.496 35.275,40.999 H 16.714 L 24.53,48.95 H 48.95 V 25.097 L 41.136,17.146 V 35.404 L 14.761,8.9" />
<path
d="M 163.24,8.902 169.1,14.492 142.72,40.999 H 161.28 L 153.47,48.95 H 129.05 V 25.092 L 136.86,17.142 V 35.402 L 163.24,8.902" />
<path
d="M 14.761,169.1 8.9,163.5 35.275,137 H 16.714 L 24.53,129.05 H 48.95 V 152.9 L 41.136,160.85 V 142.59 L 14.761,169.1" />
<path
d="M 163.24,169.1 169.1,163.51 142.72,137 H 161.28 L 153.47,129.05 H 129.05 V 152.91 L 136.86,160.86 V 142.6 L 163.24,169.1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: https://commons.wikimedia.org/wiki/User:Epop
SPDX-License-Identifier: CC0-1.0

View file

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 100.003 79.997">
<path d="M81.653 42.94c-1.387 0-2.666.767-3.315 1.992L72.942 55.1l-6.649-19.479c-.508-1.472-1.865-2.48-3.423-2.534-1.602-.046-2.983.859-3.589 2.292L54.72 46.213l-7.2-43.128c-.33-1.812-2.029-3.188-3.77-3.079-1.843.042-3.384 1.252-3.635 3.079l-6.357 50.052-5.156-26.864c-.303-1.589-1.594-2.803-3.201-3.01-1.577-.21-3.162.635-3.862 2.097l-8.435 17.58H0v7.497h15.466c1.443 0 2.756-.825 3.381-2.129l4.536-9.45 7.312 38.098c.339 1.771 1.887 3.041 3.682 3.041h.1c1.836-.049 3.367-1.421 3.616-3.241l6.259-49.182 5.247 32.385c.295 1.631 1.631 2.876 3.276 3.057 1.67.161 3.223-.742 3.867-2.275l5.635-13.374 6.27 18.359c.483 1.411 1.763 2.407 3.251 2.524 1.494.083 2.91-.659 3.613-1.982l8.398-15.83h16.094V42.94h-18.35z"/>
</svg>

After

Width:  |  Height:  |  Size: 811 B

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: United Nations Office for the Coordination of Humanitarian Affairs (OCHA)
SPDX-License-Identifier: CC0-1.0

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 75.142 99.999" enable-background="new 0 0 75.142 99.999" xml:space="preserve"><path d="M56.572,55.698c0-1.52,6.527-21.734-6.182-27.847C35.748,20.808,31.701,15.19,31.822,6.188 c-0.009,0.365-8.855,14.62-3.094,21.663c8.942,10.902,5.166,19.343,0,18.566c-8.68-1.301-7.632-12.617-6.191-15.472 c-4.536-0.478-9.782,2.343-12.378,6.188c-7.808,11.598,9.114,22.696,3.097,30.944c-4.579,6.285-12.404-6.09-12.378-6.188 c-9.29,48.494,58.182,49.726,61.889,9.284c1.104-12.128,12.024-18.725,12.375-18.569C63.515,47.243,56.572,56.086,56.572,55.698z M34.918,89.743C18.695,90.341,20.361,78.184,22.537,74.27c2.763-4.984,9.76-5.969,6.191-12.381 c0.046,0.098,7.589,1.231,12.373,6.188C48.439,75.652,47.604,89.264,34.918,89.743z"/><path d="M44.197,15.472c-1.894-2.032-3.097-4.472-3.097-6.19c0-3.221,2.631-6.317,6.193-9.282c0.357,2.579-1.543,6.447,0,9.282 c1.197,2.098,3.097,4.472,3.097,6.19c0,2.302-0.857,4.4-3.097,6.188C46.954,20.799,46.361,17.976,44.197,15.472z"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: United Nations Office for the Coordination of Humanitarian Affairs (OCHA)
SPDX-License-Identifier: CC0-1.0

View file

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 69.453" enable-background="new 0 0 100 69.453" xml:space="preserve"><path d="M68.345,48.412c3.558,1.812,8.542,2.245,11.701,0.602c4.282-2.229,7.665-3.039,11.023-2.018 c0.004-0.053,0-0.104,0.006-0.156c0.195-1.186,1.277-1.995,2.433-1.803c1.14,0.17,1.917,1.276,1.737,2.467 c-0.081,0.475-0.311,0.888-0.625,1.203c0.584,0.291,1.568,0.658,2.996,0.88l0.434-2.737c0.336-2.172-1.21-3.591-2.174-3.872 l-1.451-6.731c-0.266-1.287-1.105-2.478-3.007-2.789l-3.462-0.547l-5.921-0.938l-3.523-0.557c-1.891-0.291-3.059,0.584-3.719,1.721 l-3.462,5.954c-0.994-0.028-2.901,0.845-3.241,3.017l-0.911,5.737C67.556,48.015,67.941,48.199,68.345,48.412z M76.54,34.737 c0.339-0.676,0.765-1.127,1.585-1.009l6.465,1.021l0.019,0.004l6.485,1.027c0.806,0.139,1.071,0.701,1.194,1.446l1.061,5.289 l-9.725-1.539l-0.02-0.005l-9.707-1.537L76.54,34.737z M70.559,43.591c0.183-1.188,1.265-1.997,2.41-1.807 c1.148,0.172,1.927,1.278,1.735,2.466c-0.185,1.177-1.267,1.988-2.411,1.805C71.146,45.875,70.366,44.769,70.559,43.591z"/><path d="M56.944,19.599V3.188H45.833v6.594L34.762,0L2.777,28.188h5.556v19.026c3.528-1.311,7.012-0.561,11.57,1.799 c3.131,1.644,8.188,1.211,11.702-0.602c4.883-2.563,7.509-1.95,12.629,0.327c3.91,1.749,7.472,1.755,11.426,0 c2.117-0.944,3.825-1.575,5.45-1.839V28.188h5.557L56.944,19.599z"/><path d="M93.933,56.591c-4.379-2.686-8.391-2.149-13.887,0.71c-3.159,1.644-8.144,1.21-11.701-0.601 c-4.838-2.562-7.592-1.941-12.685,0.327c-3.954,1.755-7.516,1.75-11.426,0c-5.12-2.276-7.746-2.89-12.629-0.327 c-3.513,1.811-8.57,2.244-11.702,0.601c-5.525-2.859-9.466-3.396-13.833-0.71c0,0-1.901,1.451-6.07,1.475v2.314v8.178v0.619 c4.169-0.024,6.07-1.474,6.07-1.474c4.367-2.688,8.309-2.151,13.833,0.708c3.131,1.644,8.188,1.211,11.702-0.599 c4.883-2.565,7.509-1.95,12.629,0.325c3.91,1.75,7.472,1.756,11.426,0c5.093-2.268,7.847-2.891,12.685-0.325 c3.558,1.81,8.542,2.242,11.701,0.599c5.496-2.859,9.508-3.396,13.887-0.708c0,0,1.816,1.456,6.067,1.474v-0.619V60.38v-2.314 C95.749,58.048,93.933,56.591,93.933,56.591z"/></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: Iconathon
SPDX-License-Identifier: CC0-1.0

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg id="svg5184" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="15" width="15" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 15 15">
<metadata id="metadata5189">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<g id="layer1" transform="translate(0 -1037.4)">
<g id="landslide-15" transform="translate(-185 775)">
<path id="path7243" opacity=".5" stroke-linejoin="round" style="color:#000000" d="m199 263.36-5.6562 5.6562l-3.34-0.66-2.84 0.16 0.84 0.84c-0.82843 0-1.5 0.67157-1.5 1.5s0.67157 1.5 1.5 1.5 1.5-0.67157 1.5-1.5l1 1-4.5 4.5h13v-13zm-8 1c-1.1046 0-2 0.89543-2 2s0.89543 2 2 2 2-0.89543 2-2-0.89543-2-2-2zm-4 2c-0.55229 0-1 0.44771-1 1s0.44771 1 1 1 1-0.44771 1-1-0.44771-1-1-1z" stroke-dashoffset="9.9" stroke="#fefefe" stroke-linecap="round" stroke-width="2" fill="#fefefe"/>
<g>
<path id="path7186" style="color:#000000" d="m199 263.36-13 13h13v-13z"/>
<g>
<circle id="path7188" style="color:#000000" transform="translate(177 88.362)" cy="178" cx="14" r="2"/>
<circle id="path7188-4" style="color:#000000" transform="matrix(0.75 0 0 0.75 177.5 137.36)" cy="178" cx="14" r="2"/>
<circle id="path7188-4-0" style="color:#000000" transform="matrix(0.5 0 0 0.5 180 178.36)" cy="178" cx="14" r="2"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: Development Seed
SPDX-License-Identifier: CC-BY-3.0

View file

@ -0,0 +1,56 @@
[
{
"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"
]
}
]

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="700" height="700" viewBox="-350 -350 700 700">
<circle fill="#FFAA00" r="350"/>
<path fill="#003680" d="M249.41531629,144H-249.41531629L0-288z"/>
</svg>

After

Width:  |  Height:  |  Size: 238 B

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: https://commons.wikimedia.org/wiki/User:MStankie
SPDX-License-Identifier: LicenseRef-TRIVIAL

View file

@ -0,0 +1,75 @@
{
"id": "disaster_response",
"title": {
"render": {
"en": "Disaster response organization",
"it": "Organizzazione per la risposta ai disastri"
}
},
"name": {
"en": "Disaster response organizations"
},
"description": {
"en": "This layer contains organizations that have the main objective to help the civil population during and after natural or anthropogenic disasters by working in the affected area.",
"it": "Questo livello contiene organizzazioni che hanno come obiettivo principale quello di aiutare la popolazione civile durante e dopo disastri naturali o antropogenici, lavorando nell'area colpita."
},
"docs": "https://wiki.openstreetmap.org/wiki/Tag:emergency%3Ddisaster_response",
"minzoom": 10,
"lineRendering": [
{
"color": "#6BC4F7",
"width": 3
}
],
"presets": [
{
"title": {
"en": "a disaster response organization",
"it": "un'organizzazione per la risposta ai disastri"
},
"tags": [
"emergency=disaster_response"
]
}
],
"source": {
"osmTags": {
"and": [
"emergency=disaster_response"
]
}
},
"pointRendering": [
{
"iconSize": "40,40",
"location": [
"point",
"centroid"
],
"anchor": "bottom",
"marker": [
{
"icon": "./assets/themes/disaster_response/CivilDefence.svg"
}
]
}
],
"tagRenderings": [
"images",
"website",
{
"id": "disaster_response_name",
"freeform": {
"key": "name"
},
"question": {
"en": "What is the name of this organization?",
"it": "Qual è il nome di questa organizzazione?"
},
"render": {
"en": "This organization is named <b>{name}</b>",
"it": "Questa organizzazione si chiama <b>{name}</b>"
}
}
]
}

View file

@ -0,0 +1,12 @@
[
{
"path": "CivilDefence.svg",
"license": "TRIVIAL",
"authors": [
"https://commons.wikimedia.org/wiki/User:MStankie"
],
"sources": [
"https://commons.wikimedia.org/wiki/File:CivilDefence.svg"
]
}
]

View file

@ -0,0 +1,18 @@
[
{
"path": "oneway.png",
"license": "CC0-1.0",
"authors": [
"Pieter Vander Vennet"
],
"sources": []
},
{
"path": "oneway.svg",
"license": "CC0-1.0",
"authors": [
"Pieter Vander Vennet"
],
"sources": []
}
]

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: Pieter Vander Vennet
SPDX-License-Identifier: CC0-1.0

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: Pieter Vander Vennet
SPDX-License-Identifier: CC0-1.0

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="700" height="700" viewBox="-350 -350 700 700">
<circle fill="#FFAA00" r="350"/>
<path fill="#003680" d="M249.41531629,144H-249.41531629L0-288z"/>
</svg>

After

Width:  |  Height:  |  Size: 238 B

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: https://commons.wikimedia.org/wiki/User:MStankie
SPDX-License-Identifier: LicenseRef-TRIVIAL

View file

@ -0,0 +1,19 @@
{
"description": {
"en": "This map contains elements meant for disaster preparedness and response.",
"it": "Questa mappa contiene elementi pensati per la preparazione e risposta ai disastri."
},
"docs": "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.svg",
"title": {
"en": "Disaster response",
"it": "Risposta ai disastri"
},
"layers": [
"hospital",
"assembly_point",
"disaster_response"
]
}

View file

@ -0,0 +1,24 @@
[
{
"path": "CivilDefence.svg",
"license": "TRIVIAL",
"authors": [
"https://commons.wikimedia.org/wiki/User:MStankie"
],
"sources": [
"https://commons.wikimedia.org/wiki/File:CivilDefence.svg"
]
},
{
"path": "social.svg",
"license": "TRIVIAL",
"authors": [
"Geneva Convention",
"https://commons.wikimedia.org/wiki/User:MStankie",
"https://commons.wikimedia.org/wiki/User:The_Navigators"
],
"sources": [
"https://commons.wikimedia.org/wiki/File:Geneva_Convention_Civil_Defence_Symbol_-_Flag.svg"
]
}
]

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generator: Adobe Illustrator 16.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="974.348px" height="649.889px" viewBox="-136 50.534 974.348 649.889" enable-background="new -136 50.534 974.348 649.889" xml:space="preserve">
<rect x="-136" y="50.534" fill="#FFAA00" width="974.348" height="649.889"/>
<path fill="#003680" d="M599.416,591.479H100.584l249.416-432L599.416,591.479z"/>
</svg>

After

Width:  |  Height:  |  Size: 671 B

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: Geneva Convention; https://commons.wikimedia.org/wiki/User:MStankie; https://commons.wikimedia.org/wiki/User:The_Navigators
SPDX-License-Identifier: LicenseRef-TRIVIAL

View file

@ -216,6 +216,10 @@
"if": "theme=cyclofix",
"then": "./assets/themes/cyclofix/logo.svg"
},
{
"if": "theme=disaster_response",
"then": "./assets/themes/disaster_response/CivilDefence.svg"
},
{
"if": "theme=drinking_water",
"then": "./assets/themes/drinking_water/logo.svg"

View file

@ -11,17 +11,32 @@
"layers": [
"ski_piste",
"aerialway",
{
"builtin": [
"guidepost",
"map",
"information_board"
],
"override": {
"minzoom": 13
},
"pointRendering": [
{
"=iconSize": "25,25",
"=label": null
}
]
},
{
"builtin": [
"toilet",
"drinking_water",
"food",
"map",
"information_board",
"viewpoint",
"binocular"
],
"override": {
"minzoom": 16,
"pointRendering": [
{
"=iconSize": "25,25",

View file

@ -246,9 +246,18 @@
}
},
"tagRenderings": {
"duration": {
"question": "How long takes a single journey with this elevator?",
"questionHint": "This excludes the waiting time.",
"render": "A single journey takes {duration} minutes"
},
"length": {
"render": "This aerialway is {_length:km} kilometer long"
},
"occupancy": {
"question": "How many people fit a single carriage?",
"render": "{aerialway:occupancy} people fit a single carriage"
},
"type": {
"mappings": {
"0": {
@ -483,6 +492,45 @@
"render": "Artwork"
}
},
"assembly_point": {
"description": "This layer contains assembly points and waiting areas where all employees, passengers or a large crowd assemble in case of an emergency.",
"name": "Emergency assembly points",
"presets": {
"0": {
"title": "an assembly point"
}
},
"tagRenderings": {
"assembly_point_name": {
"question": "What is the name of this assembly point?",
"render": "This assembly point is named <b>{name}</b>"
},
"assembly_point_operator": {
"question": "What organization operates this assembly point?",
"render": "This assembly point is operated by <b>{operator}</b>"
},
"disaster_type": {
"mappings": {
"0": {
"then": "Earthquake"
},
"1": {
"then": "Flood"
},
"2": {
"then": "Fire"
},
"3": {
"then": "Landslide"
}
},
"question": "For which disaster type is this assembly point meant?"
}
},
"title": {
"render": "Assembly point during emergencies"
}
},
"atm": {
"description": "ATMs to withdraw money",
"filter": {
@ -3727,6 +3775,24 @@
"description": "This layer visualizes directions",
"name": "Direction visualization"
},
"disaster_response": {
"description": "This layer contains organizations that have the main objective to help the civil population during and after natural or anthropogenic disasters by working in the affected area.",
"name": "Disaster response organizations",
"presets": {
"0": {
"title": "a disaster response organization"
}
},
"tagRenderings": {
"disaster_response_name": {
"question": "What is the name of this organization?",
"render": "This organization is named <b>{name}</b>"
}
},
"title": {
"render": "Disaster response organization"
}
},
"doctors": {
"description": "This layer shows doctor offices",
"name": "Doctors",

View file

@ -142,6 +142,42 @@
"render": "Opera darte"
}
},
"assembly_point": {
"description": "Questo livello contiene punti di raccolta e aree di attesa in cui tutti i dipendenti, i passeggeri o una grande folla si riuniscono in caso di emergenza.",
"name": "Punti di raccolta per emergenze",
"presets": {
"0": {
"title": "un punto di raccolta"
}
},
"tagRenderings": {
"assembly_point_name": {
"question": "Qual è il nome di questo punto di raccolta?",
"render": "Questo punto di raccolta si chiama <b>{name}</b>"
},
"assembly_point_operator": {
"question": "Quale organizzazione gestisce questo punto di raccolta?",
"render": "Questo punto di raccolta è gestita da <b>{operator}</b>"
},
"disaster_type": {
"mappings": {
"0": {
"then": "Terremoto"
},
"1": {
"then": "Alluvione"
},
"2": {
"then": "Incendio"
},
"3": {
"then": "Frana"
}
},
"question": "Per quali tipi di disastro è pensato questo punto di raccolta?"
}
}
},
"atm": {
"description": "Sportello Bancomat per prelevare denaro",
"name": "Sportelli Bancomat",
@ -1279,6 +1315,23 @@
"description": "Questo livello visualizza le direzioni",
"name": "Visualizzazione della direzione"
},
"disaster_response": {
"description": "Questo livello contiene organizzazioni che hanno come obiettivo principale quello di aiutare la popolazione civile durante e dopo disastri naturali o antropogenici, lavorando nell'area colpita.",
"presets": {
"0": {
"title": "un'organizzazione per la risposta ai disastri"
}
},
"tagRenderings": {
"disaster_response_name": {
"question": "Qual è il nome di questa organizzazione?",
"render": "Questa organizzazione si chiama <b>{name}</b>"
}
},
"title": {
"render": "Organizzazione per la risposta ai disastri"
}
},
"drinking_water": {
"name": "Acqua potabile",
"presets": {

View file

@ -631,6 +631,10 @@
"description": "The goal of this map is to present cyclists with an easy-to-use solution to find the appropriate infrastructure for their needs.<br><br>You 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 more data by answering the questions.<br><br>All changes you make will automatically be saved in the global database of OpenStreetMap and can be freely re-used by others.<br><br>For more information about the cyclofix project, go to <a href='https://cyclofix.osm.be/'>cyclofix.osm.be</a>.",
"title": "Cyclofix - a map for cyclists"
},
"disaster_response": {
"description": "This map contains elements meant for disaster preparedness and response.",
"title": "Disaster response"
},
"drinking_water": {
"description": "On this map, publicly accessible drinking water spots are shown and can be easily added",
"title": "Drinking Water"

View file

@ -401,6 +401,10 @@
"description": "Questa mappa offre a chi va in bici una soluzione semplice per trovare tutte le infrastrutture di cui ha bisogno.<br><br>Puoi tracciare la tua posizione esatta (solo su mobile) e selezionare i livelli che ti interessano nell'angolo in basso a sinistra. Puoi anche usare questo strumento per aggiungere o modificare punti di interesse alla mappa e aggiungere nuove informazioni rispendendo alle domande.<br><br>Tutte le modifiche che apporterai saranno automaticamente salvate nel database mondiale di OpenStreetMap e potranno essere liberamente riutilizzate da tutti e tutte.<br><br>Per maggiori informazioni sul progetto ciclofix, visita <a href='https://cyclofix.osm.be/'>cyclofix.osm.be</a>.",
"title": "Cyclofix - una mappa libera per chi va in bici"
},
"disaster_response": {
"description": "Questa mappa contiene elementi pensati per la preparazione e risposta ai disastri.",
"title": "Risposta ai disastri"
},
"drinking_water": {
"description": "Questa mappa mostra tutti i luoghi in cui è disponibile acqua potabile ed è possibile aggiungerne di nuovi",
"title": "Acqua potabile"

View file

@ -23,6 +23,7 @@ vite build --sourcemap || { echo 'Vite build failed' ; exit 1; }
cp -r assets/layers/ dist/assets/layers/
cp -r assets/themes/ dist/assets/themes/
cp -r assets/svg/ dist/assets/svg/
cp -r assets/png/ dist/assets/png/
mkdir dist/assets/langs
mkdir dist/assets/langs/layers
cp -r langs/layers/ dist/assets/langs/

View file

@ -273,7 +273,6 @@ async function generateCsp(
}
): Promise<string> {
const apiUrls: string[] = [
"'self'",
...Constants.defaultOverpassUrls,
Constants.countryCoderEndpoint,
Constants.nominatimEndpoint,
@ -350,7 +349,7 @@ async function generateCsp(
"default-src": "'self'",
"child-src": "'self' blob: ",
"img-src": "* data:", // maplibre depends on 'data:' to load
"connect-src": connectSrc.join(" "),
"connect-src": "'self' "+connectSrc.join(" "),
"report-to": "https://report.mapcomplete.org/csp",
"worker-src": "'self' blob:", // Vite somehow loads the worker via a 'blob'
"style-src": "'self' 'unsafe-inline'", // unsafe-inline is needed to change the default background pin colours

View file

@ -345,11 +345,18 @@ export class GeoOperations {
return <any>way
}
public static toCSV(features: Feature[] | FeatureCollection): string {
public static toCSV(features: Feature[] | FeatureCollection, options?: {
ignoreTags?: RegExp
}): string {
const headerValuesSeen = new Set<string>()
const headerValuesOrdered: string[] = []
function addH(key) {
function addH(key: string) {
if(options?.ignoreTags){
if(key.match(options.ignoreTags)){
return
}
}
if (!headerValuesSeen.has(key)) {
headerValuesSeen.add(key)
headerValuesOrdered.push(key)

View file

@ -312,7 +312,7 @@ export default class PointRenderingConfig extends WithContextLoader {
if (cssLabel) {
label.SetStyle(cssLabel)
} else if (labelOnly) {
return label.SetStyle("transform: translate(-50%, -50%);")
return label?.SetStyle("transform: translate(-50%, -50%);")
}
return new Combine([label]).SetClass("flex flex-col items-center")
})

View file

@ -132,11 +132,11 @@
so we use a 'div' and add on:click manually
-->
<div
class={twMerge("soft relative rounded-full p-1 cursor-pointer border border-black", size)}
class={twMerge("soft relative flex justify-center items-center border border-black rounded-full cursor-pointer p-1", size)}
on:click={() => focusMap()}
use:ariaLabelStore={label}
>
<Center class="h-7 w-7" />
<Center class=" h-6 w-6" />
</div>
{:else}
<div

View file

@ -235,31 +235,40 @@ class LineRenderingLayer {
map.on("styledata", () => self.update(features.features))
}
private addSymbolLayer(sourceId: string, url: string = "./assets/png/oneway.png"){
private async addSymbolLayer(sourceId: string, url: string = "./assets/png/oneway.png") {
const map = this._map
const imgId = url.replaceAll(/[/.-]/g, "_")
map.loadImage(url, (err, image) => {
if (err) {
console.error("Could not add symbol layer to line due to", err);
return
}
map.addImage(imgId, image);
map.addLayer({
'id': "symbol-layer"+imgId,
if (map.getImage(imgId) === undefined) {
await new Promise<void>((resolve, reject) => {
map.loadImage(url, (err, image) => {
if (err) {
console.error("Could not add symbol layer to line due to", err)
reject(err)
return
}
map.addImage(imgId, image)
resolve()
})
})
}
map.addLayer({
"id": "symbol-layer_" + this._layername + "-" + imgId,
'type': 'symbol',
'source': sourceId,
'layout': {
'symbol-placement': 'line',
'symbol-spacing': 1,
'symbol-spacing': 10,
'icon-allow-overlap': true,
'icon-rotation-alignment':'map',
'icon-pitch-alignment':'map',
'icon-image': imgId,
'icon-size': 0.045,
'icon-size': 0.055,
'visibility': 'visible'
}
});
});
}
public destruct(): void {
@ -347,7 +356,13 @@ class LineRenderingLayer {
"line-cap": "round",
},
})
this.addSymbolLayer(this._layername)
if(this._layername.startsWith("mapcomplete_ski_piste") || this._layername.startsWith("mapcomplete_aerialway")){
// TODO FIXME properly enable this so that more layers can use this if appropriate
this.addSymbolLayer(this._layername)
}else{
console.log("No oneway arrow for", this._layername)
}
for (const feature of features) {

View file

@ -16,6 +16,11 @@ import mcChanges from "../../src/assets/generated/themes/mapcomplete-changes.jso
import SvelteUIElement from "./Base/SvelteUIElement"
import Filterview from "./BigComponents/Filterview.svelte"
import FilteredLayer from "../Models/FilteredLayer"
import DownloadButton from "./DownloadFlow/DownloadButton.svelte"
import { SubtleButton } from "./Base/SubtleButton"
import { GeoOperations } from "../Logic/GeoOperations"
import { Polygon } from "geojson"
import { Feature } from "geojson"
class StatsticsForOverviewFile extends Combine {
constructor(homeUrl: string, paths: string[]) {
@ -185,6 +190,17 @@ class StatsticsForOverviewFile extends Combine {
}
}
elements.push(new SubtleButton(
undefined, "Download as csv"
).onClick(() => {
const data = GeoOperations.toCSV(overview._meta,
{
ignoreTags: /^((deletion:node)|(import:node)|(move:node)|(soft-delete:))/
})
Utils.offerContentsAsDownloadableFile(data , "statistics.csv", {mimetype: "text/csv"})
}))
return new Combine(elements)
},
[filteredLayer.currentFilter]
@ -249,7 +265,7 @@ class ChangesetsOverview {
this._meta = Utils.NoNull(meta)
}
public static fromDirtyData(meta: ChangeSetData[]) {
public static fromDirtyData(meta: ChangeSetData[]): ChangesetsOverview {
return new ChangesetsOverview(meta?.map((cs) => ChangesetsOverview.cleanChangesetData(cs)))
}
@ -301,7 +317,7 @@ class ChangesetsOverview {
}
}
interface ChangeSetData {
interface ChangeSetData extends Feature<Polygon> {
id: number
type: "Feature"
geometry: {