Merge branch 'develop'

This commit is contained in:
Pieter Vander Vennet 2025-01-02 15:28:13 +01:00
commit 432122c7a0
63 changed files with 864 additions and 2358 deletions

6
.gitignore vendored
View file

@ -4,9 +4,10 @@ node_modules
.cache/* .cache/*
.idea/* .idea/*
scratch scratch
src/assets/editor-layer-index.json
src/assets/generated/
assets/editor-layer-index.json assets/editor-layer-index.json
assets/generated/* assets/generated/*
src/assets/generated/
assets/layers/favourite/favourite.json assets/layers/favourite/favourite.json
public/*.webmanifest public/*.webmanifest
/*.html /*.html
@ -20,8 +21,6 @@ missing_translations.txt
.DS_Store .DS_Store
Svg.ts Svg.ts
data/ data/
src/assets/generated/nsi_stats/brand.json
src/assets/generated/nsi_stats/brand.summarized.json
Folder.DotSettings.user Folder.DotSettings.user
index_*.ts index_*.ts
@ -29,7 +28,6 @@ index_*.ts
*.doctest.ts *.doctest.ts
service-worker.js service-worker.js
.env .env
src/assets/editor-layer-index.json
error_changeset_* error_changeset_*

View file

@ -1,57 +1,49 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport"> <meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' https://gc.zgo.at/; img-src *; connect-src 'self' https://www.openstreetmap.org/ https://api.openstreetmap.org/;"> <meta http-equiv="Content-Security-Policy"
<link href="./css/mobile.css" rel="stylesheet"/> content="default-src 'self'; script-src 'self' https://gc.zgo.at/; img-src *; connect-src 'self' https://www.openstreetmap.org/ https://api.openstreetmap.org/;">
<link href="./css/tagrendering.css" rel="stylesheet"/> <link href="./css/mobile.css" rel="stylesheet" />
<link href="./css/index-tailwind-output.css" rel="stylesheet"/> <link href="./css/tagrendering.css" rel="stylesheet" />
<meta content="website" property="og:type"> <link href="./css/index-tailwind-output.css" rel="stylesheet" />
<meta content="website" property="og:type">
<title>MapComplete - page not found</title> <title>MapComplete - page not found</title>
<link href="./index.manifest" rel="manifest"> <link href="./index.manifest" rel="manifest">
<link href="./assets/svg/add.svg" rel="icon" sizes="any" type="image/svg+xml"> <link href="./assets/svg/add.svg" rel="icon" sizes="any" type="image/svg+xml">
<meta content="MapComplete - Page not found" property="og:title"> <meta content="MapComplete - Page not found" property="og:title">
<meta content="MapComplete is a platform to visualize OpenStreetMap on a specific topic and to easily contribute data back to it." <meta
property="og:description"> content="MapComplete is a platform to visualize OpenStreetMap on a specific topic and to easily contribute data back to it."
property="og:description">
<link href="./assets/generated/images/assets_svg_mapcomplete_logo512.png" rel="apple-touch-icon" sizes="512x512"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo512.png" rel="apple-touch-icon" sizes="512x512">
<link href="./assets/generated/images/assets_svg_mapcomplete_logo384.png" rel="apple-touch-icon" sizes="384x384"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo384.png" rel="apple-touch-icon" sizes="384x384">
<link href="./assets/generated/images/assets_svg_mapcomplete_logo192.png" rel="apple-touch-icon" sizes="192x192"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo192.png" rel="apple-touch-icon" sizes="192x192">
<link href="./assets/generated/images/assets_svg_mapcomplete_logo180.png" rel="apple-touch-icon" sizes="180x180"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo180.png" rel="apple-touch-icon" sizes="180x180">
<link href="./assets/generated/images/assets_svg_mapcomplete_logo152.png" rel="apple-touch-icon" sizes="152x152"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo152.png" rel="apple-touch-icon" sizes="152x152">
<link href="./assets/generated/images/assets_svg_mapcomplete_logo144.png" rel="apple-touch-icon" sizes="144x144"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo144.png" rel="apple-touch-icon" sizes="144x144">
<link href="./assets/generated/images/assets_svg_mapcomplete_logo128.png" rel="apple-touch-icon" sizes="128x128"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo128.png" rel="apple-touch-icon" sizes="128x128">
<link href="./assets/generated/images/assets_svg_mapcomplete_logo120.png" rel="apple-touch-icon" sizes="120x120"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo120.png" rel="apple-touch-icon" sizes="120x120">
<link href="./assets/generated/images/assets_svg_mapcomplete_logo96.png" rel="apple-touch-icon" sizes="96x96"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo96.png" rel="apple-touch-icon" sizes="96x96">
<link href="./assets/generated/images/assets_svg_mapcomplete_logo72.png" rel="apple-touch-icon" sizes="72x72"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo72.png" rel="apple-touch-icon" sizes="72x72">
<style> <style>
#decoration-desktop img { #decoration-desktop img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
</style> </style>
</head> </head>
<body> <body>
<div id="maindiv" class="h-screen"></div>
<div id="decoration-desktop" style="position: fixed; left: 1em; bottom: 1em; width:35vh; height:35vh;">
<!-- A nice decoration while loading or on errors -->
<!-- DECORATION 0 START -->
<img src="./assets/svg/add.svg"/>
<!-- DECORATION 0 END -->
</div>
<div class="clutter absolute h-24 left-24 right-24 top-56 text-xl text-center"
id="maindiv" style="z-index: 4000">
Not found...
</div>
<script type="module" src="./src/notfound.ts"></script> <script type="module" src="./src/notfound.ts"></script>
<script async data-goatcounter="https://pietervdvn.goatcounter.com/count" src="//gc.zgo.at/count.js" crossorigin="anonymous" integrity="sha384-QfJMxHNngbaF6IXH2kBwubsLYh7GVSFmJOX1O1YKJBq+zv1VVypB9BysTzyG1D1U"></script> <script async data-goatcounter="https://pietervdvn.goatcounter.com/count" src="//gc.zgo.at/count.js"
crossorigin="anonymous"
integrity="sha384-QfJMxHNngbaF6IXH2kBwubsLYh7GVSFmJOX1O1YKJBq+zv1VVypB9BysTzyG1D1U"></script>
</body> </body>
</html> </html>

View file

@ -8,10 +8,18 @@ builds.mapcomplete.org {
dev.mapcomplete.org { dev.mapcomplete.org {
root * public/develop/ root * public/develop/
try_files {path}.html
file_server file_server
header { header {
+Permissions-Policy "interest-cohort=()" +Permissions-Policy "interest-cohort=()"
} }
handle_errors {
@404 {
expression {http.error.status_code} == 404
}
rewrite @404 /404.html
file_server
}
} }
single.mapcomplete.org { single.mapcomplete.org {

View file

@ -346,7 +346,7 @@ No default value set
The initial/current zoom level The initial/current zoom level
This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L42) This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L43)
The default value is _1_ The default value is _1_
@ -354,7 +354,7 @@ The default value is _1_
The initial/current latitude The initial/current latitude
This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L42) This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L43)
The default value is _0_ The default value is _0_
@ -362,7 +362,7 @@ The default value is _0_
The initial/current longitude of the app The initial/current longitude of the app
This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L42) This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L43)
The default value is _0_ The default value is _0_
@ -410,7 +410,7 @@ The default value is _0_
The mode the application starts in, e.g. 'map', 'dashboard' or 'statistics' The mode the application starts in, e.g. 'map', 'dashboard' or 'statistics'
This documentation is defined in the source code at [generateDocs.ts](ervdvn/git2/MapComplete/scripts/generateDocs.ts#L436) This documentation is defined in the source code at [generateDocs.ts](ervdvn/git/MapComplete/scripts/generateDocs.ts#L436)
The default value is _map_ The default value is _map_

View file

@ -273,6 +273,9 @@
"width": "8" "width": "8"
} }
], ],
"calculatedTags": [
"width:= ! ! (feat.properties['width:carriageway']) ? feat.properties['width:carriageway'] : feat.properties['width'] "
],
"tagRenderings": [ "tagRenderings": [
"images", "images",
{ {
@ -1289,16 +1292,16 @@
] ]
}, },
"render": { "render": {
"en": "The carriage width of this road is <strong>{width:carriageway}m</strong>", "en": "The carriage width of this road is <strong>{width}m</strong>",
"nl": "De breedte van deze rijbaan in deze straat is <strong>{width:carriageway}m</strong>", "nl": "De breedte van deze rijbaan in deze straat is <strong>{width}m</strong>",
"de": "Die Fahrbahnbreite dieser Straße beträgt <strong>{width:carriageway}m</strong>", "de": "Die Fahrbahnbreite dieser Straße beträgt <strong>{width}m</strong>",
"fr": "La largeur de cette chaussée est de <strong>{width:carriageway}m</strong>", "fr": "La largeur de cette chaussée est de <strong>{width}m</strong>",
"ca": "L'amplada dels carrils d'aquesta carretera és <strong>{width:carriageway}m</strong>", "ca": "L'amplada dels carrils d'aquesta carretera és <strong>{width}m</strong>",
"cs": "Šířka vozovky této silnice je <strong>{width:carriageway}m</strong>", "cs": "Šířka vozovky této silnice je <strong>{width}m</strong>",
"es": "El ancho de la calzada de esta carretera es de <strong>{width:carriageway}m</strong>" "es": "El ancho de la calzada de esta carretera es de <strong>{width}m</strong>"
}, },
"freeform": { "freeform": {
"key": "width:carriageway", "key": "width",
"type": "distance", "type": "distance",
"helperArgs": [ "helperArgs": [
"20", "20",
@ -1314,7 +1317,7 @@
"cs": "Jaká je šířka vozovky této silnice (v metrech)?", "cs": "Jaká je šířka vozovky této silnice (v metrech)?",
"es": "¿Cuál es el ancho de la calzada de esta carretera (en metros)?" "es": "¿Cuál es el ancho de la calzada de esta carretera (en metros)?"
}, },
"id": "width:carriageway", "id": "width",
"questionHint": { "questionHint": {
"en": "This is measured curb to curb and thus includes the width of parallell parking lanes", "en": "This is measured curb to curb and thus includes the width of parallell parking lanes",
"nl": "Dit is gemeten van stoepsteen tot stoepsteen, dus inclusief een parallelle parkeerstrook", "nl": "Dit is gemeten van stoepsteen tot stoepsteen, dus inclusief een parallelle parkeerstrook",

View file

@ -523,6 +523,43 @@
} }
] ]
}, },
{
"id": "optometrist_service",
"#": "Quite often, opticians also sell hearing aids and vice versa. They often also have a certified optometrist or audiologist",
"condition": {
"or": [
"shop=optician",
"shop=hearing_aid",
"shop=medical_supply"
]
},
"question": {
"en": "Are medical services available here?",
"nl": "Zijn hier medische services beschikbaar?"
},
"multiAnswer": true,
"mappings": [
{
"if": "healthcare=optometrist",
"ifnot": "not:healtcare=optometrist",
"addExtraTags": [
"not:healthcare=optometrist"
],
"then": {
"en": "This shop offers eye exams by certified optometrists",
"nl": "Hier kan men een oogtest door een erkende optometrist laten uitvoeren"
}
},
{
"if": "healthcare=audiologist",
"ifnot": "not:healthcare=audiologist",
"then": {
"en": "This shop offers hearing tests by a certified audiologist",
"nl": "HIer kan men een hoortest laten uitvoeren door een erkende audioloog"
}
}
]
},
{ {
"id": "key_cutter", "id": "key_cutter",
"question": { "question": {

View file

@ -27,11 +27,7 @@
"cs": "Jedná se o veřejný odpadkový koš, odpadkový koš, kam můžete vyhodit odpadky." "cs": "Jedná se o veřejný odpadkový koš, odpadkový koš, kam můžete vyhodit odpadky."
}, },
"source": { "source": {
"osmTags": { "osmTags": "amenity=waste_basket"
"and": [
"amenity=waste_basket"
]
}
}, },
"minzoom": 17, "minzoom": 17,
"title": { "title": {
@ -489,4 +485,4 @@
"enableRelocation": false, "enableRelocation": false,
"enableImproveAccuracy": true "enableImproveAccuracy": true
} }
} }

View file

@ -27,7 +27,6 @@
"osmTags": "amenity=waste_disposal" "osmTags": "amenity=waste_disposal"
}, },
"minzoom": 12, "minzoom": 12,
"minzoomVisible": 12,
"title": { "title": {
"render": { "render": {
"en": "Waste Disposal", "en": "Waste Disposal",
@ -324,4 +323,4 @@
"enableImproveAccuracy": true, "enableImproveAccuracy": true,
"enableRelocation": true "enableRelocation": true
} }
} }

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

@ -7,90 +7,36 @@
viewBox="0 0 40 40" viewBox="0 0 40 40"
version="1.1" version="1.1"
id="svg5" id="svg5"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)" sodipodi:docname="brick_wall_square.svg"
sodipodi:docname="bick_wal_square.svg" inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"> xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview <sodipodi:namedview
id="namedview7" id="namedview1"
pagecolor="#ddda7c" pagecolor="#ffffff"
bordercolor="#eeeeee" bordercolor="#999999"
borderopacity="1" borderopacity="1"
inkscape:pageshadow="0" inkscape:showpageshadow="2"
inkscape:pageopacity="0.78431373" inkscape:pageopacity="0"
inkscape:pagecheckerboard="true" inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm" inkscape:document-units="mm"
showgrid="false" inkscape:zoom="4.1073591"
showguides="true" inkscape:cx="33.354766"
inkscape:guide-bbox="true" inkscape:cy="98.481772"
inkscape:snap-global="true"
inkscape:snap-others="false"
inkscape:snap-to-guides="false"
inkscape:zoom="3.6400926"
inkscape:cx="77.470557"
inkscape:cy="91.893267"
inkscape:window-width="1920" inkscape:window-width="1920"
inkscape:window-height="995" inkscape:window-height="1005"
inkscape:window-x="0" inkscape:window-x="0"
inkscape:window-y="0" inkscape:window-y="0"
inkscape:window-maximized="1" inkscape:window-maximized="1"
inkscape:current-layer="layer1"> inkscape:current-layer="svg5" />
<sodipodi:guide
position="-1.158135,35.017833"
orientation="0,-1"
id="guide1027" />
<sodipodi:guide
position="-0.65554813,30.013816"
orientation="0,-1"
id="guide1029" />
<sodipodi:guide
position="-0.5462901,25.009798"
orientation="0,-1"
id="guide1031" />
<sodipodi:guide
position="-0.5025869,20.005781"
orientation="0,-1"
id="guide1033" />
<sodipodi:guide
position="-0.30592246,15.001764"
orientation="0,-1"
id="guide1035" />
<sodipodi:guide
position="-0.10925802,9.9977463"
orientation="0,-1"
id="guide1037" />
<sodipodi:guide
position="-0.021851604,4.993729"
orientation="0,-1"
id="guide1039" />
<sodipodi:guide
position="-0.15296123,0.033414841"
orientation="0,-1"
id="guide1041" />
</sodipodi:namedview>
<defs
id="defs2">
<mask
maskUnits="userSpaceOnUse"
id="mask1309">
<rect
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect1311"
width="40"
height="40"
x="0"
y="0"
rx="0" />
</mask>
</defs>
<g <g
inkscape:groupmode="layer"
id="layer2" id="layer2"
inkscape:label="bg" style="display:inline">
style="display:inline"
sodipodi:insensitive="true">
<rect <rect
style="fill:#cccccc;fill-opacity:1;stroke:none;stroke-width:0.799999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1" style="fill:#cccccc;fill-opacity:1;stroke:none;stroke-width:0.799999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3582" id="rect3582"
@ -100,830 +46,36 @@
y="-0.074673384" y="-0.074673384"
rx="1.0000006" /> rx="1.0000006" />
</g> </g>
<g <path
inkscape:label="Layer 1" style="fill:none;fill-opacity:1;stroke:#e75316;stroke-width:4;stroke-linecap:square;stroke-dasharray:4,4.8;stroke-dashoffset:0;stroke-opacity:1"
inkscape:groupmode="layer" d="M -2.1399179,2.982166 H 42.754572"
id="layer1" id="path103" />
style="display:inline"> <path
<g style="fill:none;fill-opacity:1;stroke:#e75316;stroke-width:4;stroke-linecap:square;stroke-dasharray:4, 4.8;stroke-dashoffset:0;stroke-opacity:1"
id="g4136" d="M 2,7.8723545 H 46.89449"
mask="url(#mask1309)"> id="path1" />
<rect <path
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1" style="fill:none;fill-opacity:1;stroke:#e75316;stroke-width:4;stroke-linecap:square;stroke-dasharray:4, 4.8;stroke-dashoffset:0;stroke-opacity:1"
id="rect1329" d="M -2.1399179,12.762543 H 42.754572"
width="8.3345375" id="path2" />
height="4.1914907" <path
x="0.39070213" style="fill:none;fill-opacity:1;stroke:#e75316;stroke-width:4;stroke-linecap:square;stroke-dasharray:4, 4.8;stroke-dashoffset:0;stroke-opacity:1"
y="15.480371" d="M 2,17.652732 H 46.89449"
rx="0.98275834" /> id="path3" />
<rect <path
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1" style="fill:none;fill-opacity:1;stroke:#e75316;stroke-width:4;stroke-linecap:square;stroke-dasharray:4, 4.8;stroke-dashoffset:0;stroke-opacity:1"
id="rect3237" d="M -2.1399179,22.437411 H 42.754572"
width="8.3345375" id="path4" />
height="4.1914907" <path
x="8.7252398" style="fill:none;fill-opacity:1;stroke:#e75316;stroke-width:4;stroke-linecap:square;stroke-dasharray:4, 4.8;stroke-dashoffset:0;stroke-opacity:1"
y="15.480371" d="M 2,27.3276 H 46.89449"
rx="0.98275834" /> id="path5" />
<rect <path
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1" style="fill:none;fill-opacity:1;stroke:#e75316;stroke-width:4;stroke-linecap:square;stroke-dasharray:4, 4.8;stroke-dashoffset:0;stroke-opacity:1"
id="rect3239" d="M -2.1399179,32.217788 H 42.754572"
width="8.3345375" id="path6" />
height="4.1914907" <path
x="17.059776" style="fill:none;fill-opacity:1;stroke:#e75316;stroke-width:4;stroke-linecap:square;stroke-dasharray:4, 4.8;stroke-dashoffset:0;stroke-opacity:1"
y="15.480371" d="M 2,37.107977 H 46.89449"
rx="0.98275834" /> id="path7" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3241"
width="8.3345375"
height="4.1914907"
x="25.394314"
y="15.480371"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3243"
width="8.3345375"
height="4.1914907"
x="33.728851"
y="15.480371"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3245"
width="8.3345375"
height="4.1914907"
x="-3.7394707"
y="20.406551"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3247"
width="8.3345375"
height="4.1914907"
x="4.5950665"
y="20.406551"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3249"
width="8.3345375"
height="4.1914907"
x="12.929604"
y="20.406551"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3251"
width="8.3345375"
height="4.1914907"
x="21.264141"
y="20.406551"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3253"
width="8.3345375"
height="4.1914907"
x="29.598679"
y="20.406551"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3255"
width="8.3345375"
height="4.1914907"
x="37.933216"
y="20.406551"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3257"
width="8.3345375"
height="4.1914907"
x="0.39070213"
y="5.4531813"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3259"
width="8.3345375"
height="4.1914907"
x="8.7252398"
y="5.4531813"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3261"
width="8.3345375"
height="4.1914907"
x="17.059776"
y="5.4531813"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3263"
width="8.3345375"
height="4.1914907"
x="25.394314"
y="5.4531813"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3265"
width="8.3345375"
height="4.1914907"
x="33.728851"
y="5.4531813"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3267"
width="8.3345375"
height="4.1914907"
x="-3.7394707"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3269"
width="8.3345375"
height="4.1914907"
x="4.5950665"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3271"
width="8.3345375"
height="4.1914907"
x="12.929604"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3273"
width="8.3345375"
height="4.1914907"
x="21.264141"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3275"
width="8.3345375"
height="4.1914907"
x="29.598679"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3277"
width="8.3345375"
height="4.1914907"
x="37.933216"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3279"
width="8.3345375"
height="4.1914907"
x="0.39070213"
y="5.4531813"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3281"
width="8.3345375"
height="4.1914907"
x="8.7252398"
y="5.4531813"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3283"
width="8.3345375"
height="4.1914907"
x="17.059776"
y="5.4531813"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3285"
width="8.3345375"
height="4.1914907"
x="25.394314"
y="5.4531813"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3287"
width="8.3345375"
height="4.1914907"
x="33.728851"
y="5.4531813"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3289"
width="8.3345375"
height="4.1914907"
x="-3.7394707"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3291"
width="8.3345375"
height="4.1914907"
x="4.5950665"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3293"
width="8.3345375"
height="4.1914907"
x="12.929604"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3295"
width="8.3345375"
height="4.1914907"
x="21.264141"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3297"
width="8.3345375"
height="4.1914907"
x="29.598679"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3299"
width="8.3345375"
height="4.1914907"
x="37.933216"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3301"
width="8.3345375"
height="4.1914907"
x="8.7252398"
y="15.480371"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3303"
width="8.3345375"
height="4.1914907"
x="0.39070213"
y="5.4531813"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3305"
width="8.3345375"
height="4.1914907"
x="8.7252398"
y="5.4531813"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3307"
width="8.3345375"
height="4.1914907"
x="17.059776"
y="5.4531813"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3309"
width="8.3345375"
height="4.1914907"
x="25.394314"
y="5.4531813"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3311"
width="8.3345375"
height="4.1914907"
x="33.728851"
y="5.4531813"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3313"
width="8.3345375"
height="4.1914907"
x="-3.7394707"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3315"
width="8.3345375"
height="4.1914907"
x="4.5950665"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3317"
width="8.3345375"
height="4.1914907"
x="12.929604"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3319"
width="8.3345375"
height="4.1914907"
x="21.264141"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3321"
width="8.3345375"
height="4.1914907"
x="29.598679"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3323"
width="8.3345375"
height="4.1914907"
x="37.933216"
y="10.423086"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3325"
width="8.3345375"
height="4.1914907"
x="0.39070213"
y="35.221924"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3327"
width="8.3345375"
height="4.1914907"
x="8.7252398"
y="35.221924"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3329"
width="8.3345375"
height="4.1914907"
x="17.059776"
y="35.221924"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3331"
width="8.3345375"
height="4.1914907"
x="25.394314"
y="35.221924"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3333"
width="8.3345375"
height="4.1914907"
x="33.728851"
y="35.221924"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3347"
width="8.3345375"
height="4.1914907"
x="0.39070213"
y="25.340094"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3349"
width="8.3345375"
height="4.1914907"
x="8.7252398"
y="25.340094"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3351"
width="8.3345375"
height="4.1914907"
x="17.059776"
y="25.340094"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3353"
width="8.3345375"
height="4.1914907"
x="25.394314"
y="25.340094"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3355"
width="8.3345375"
height="4.1914907"
x="33.728851"
y="25.340094"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3357"
width="8.3345375"
height="4.1914907"
x="-3.7394707"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3359"
width="8.3345375"
height="4.1914907"
x="4.5950665"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3361"
width="8.3345375"
height="4.1914907"
x="12.929604"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3363"
width="8.3345375"
height="4.1914907"
x="21.264141"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3365"
width="8.3345375"
height="4.1914907"
x="29.598679"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3367"
width="8.3345375"
height="4.1914907"
x="37.933216"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3369"
width="8.3345375"
height="4.1914907"
x="0.39070213"
y="25.340094"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3371"
width="8.3345375"
height="4.1914907"
x="8.7252398"
y="25.340094"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3373"
width="8.3345375"
height="4.1914907"
x="17.059776"
y="25.340094"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3375"
width="8.3345375"
height="4.1914907"
x="25.394314"
y="25.340094"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3377"
width="8.3345375"
height="4.1914907"
x="33.728851"
y="25.340094"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3379"
width="8.3345375"
height="4.1914907"
x="-3.7394707"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3381"
width="8.3345375"
height="4.1914907"
x="4.5950665"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3383"
width="8.3345375"
height="4.1914907"
x="12.929604"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3385"
width="8.3345375"
height="4.1914907"
x="21.264141"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3387"
width="8.3345375"
height="4.1914907"
x="29.598679"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3389"
width="8.3345375"
height="4.1914907"
x="37.933216"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3391"
width="8.3345375"
height="4.1914907"
x="8.7252398"
y="35.221924"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3393"
width="8.3345375"
height="4.1914907"
x="0.39070213"
y="25.340094"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3395"
width="8.3345375"
height="4.1914907"
x="8.7252398"
y="25.340094"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3397"
width="8.3345375"
height="4.1914907"
x="17.059776"
y="25.340094"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3399"
width="8.3345375"
height="4.1914907"
x="25.394314"
y="25.340094"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3401"
width="8.3345375"
height="4.1914907"
x="33.728851"
y="25.340094"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3403"
width="8.3345375"
height="4.1914907"
x="-3.7394707"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3405"
width="8.3345375"
height="4.1914907"
x="4.5950665"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3407"
width="8.3345375"
height="4.1914907"
x="12.929604"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3409"
width="8.3345375"
height="4.1914907"
x="21.264141"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3411"
width="8.3345375"
height="4.1914907"
x="29.598679"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3413"
width="8.3345375"
height="4.1914907"
x="37.933216"
y="30.266273"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3415"
width="8.3345375"
height="4.1914907"
x="-3.7394707"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3417"
width="8.3345375"
height="4.1914907"
x="4.5950665"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3419"
width="8.3345375"
height="4.1914907"
x="12.929604"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3421"
width="8.3345375"
height="4.1914907"
x="21.264141"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3423"
width="8.3345375"
height="4.1914907"
x="29.598679"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3425"
width="8.3345375"
height="4.1914907"
x="37.933216"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3427"
width="8.3345375"
height="4.1914907"
x="-3.7394707"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3429"
width="8.3345375"
height="4.1914907"
x="4.5950665"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3431"
width="8.3345375"
height="4.1914907"
x="12.929604"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3433"
width="8.3345375"
height="4.1914907"
x="21.264141"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3435"
width="8.3345375"
height="4.1914907"
x="29.598679"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3437"
width="8.3345375"
height="4.1914907"
x="37.933216"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3439"
width="8.3345375"
height="4.1914907"
x="-3.7394707"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3441"
width="8.3345375"
height="4.1914907"
x="4.5950665"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3443"
width="8.3345375"
height="4.1914907"
x="12.929604"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3445"
width="8.3345375"
height="4.1914907"
x="21.264141"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3447"
width="8.3345375"
height="4.1914907"
x="29.598679"
y="0.42482772"
rx="0.98275834" />
<rect
style="fill:#e75316;fill-opacity:1;stroke:#cccccc;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:100;stroke-dasharray:none;stroke-opacity:1"
id="rect3449"
width="8.3345375"
height="4.1914907"
x="37.933216"
y="0.42482772"
rx="0.98275834" />
</g>
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -1318,5 +1318,15 @@
"sources": [ "sources": [
"https://www.wikipedia.org/" "https://www.wikipedia.org/"
] ]
},
{
"path": "world.svg",
"license": "GPL 2.0",
"authors": [
"https://github.com/hiddewie"
],
"sources": [
"https://github.com/openstreetmap/openstreetmap-website/blob/d38f6484e1aa201284b7eac19dbcc7fad856b88a/assets/sign-up-illustration.svg"
]
} }
] ]

1
assets/svg/world.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 49 KiB

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: https://github.com/hiddewie
SPDX-License-Identifier: GPL 2.0

View file

@ -61,7 +61,6 @@
"builtin": "shops", "builtin": "shops",
"override": { "override": {
"minzoom": 18, "minzoom": 18,
"minzoomVisible": 18,
"description": { "description": {
"en": "Add a new post partner to the map in an existing shop", "en": "Add a new post partner to the map in an existing shop",
"de": "Hinzufügen eines neuen Post-Partners auf der Karte in einem bestehenden Geschäft", "de": "Hinzufügen eines neuen Post-Partners auf der Karte in einem bestehenden Geschäft",

View file

@ -40,8 +40,7 @@
{ {
"builtin": "waste_basket", "builtin": "waste_basket",
"override": { "override": {
"minzoom": 16, "minzoom": 16
"minzoomVisible": 16
} }
}, },
"recycling", "recycling",

View file

@ -2889,10 +2889,10 @@
}, },
"question": "Aquesta carretera està il·luminada?" "question": "Aquesta carretera està il·luminada?"
}, },
"width:carriageway": { "width": {
"question": "Quina és l'amplada dels carrils d'aquesta carretera (en metres)?", "question": "Quina és l'amplada dels carrils d'aquesta carretera (en metres)?",
"questionHint": "Això es mesura de vorera a vorera i, per tant, inclou l'amplada dels aparcaments en línia", "questionHint": "Això es mesura de vorera a vorera i, per tant, inclou l'amplada dels aparcaments en línia",
"render": "L'amplada dels carrils d'aquesta carretera és <strong>{width:carriageway}m</strong>" "render": "L'amplada dels carrils d'aquesta carretera és <strong>{width}m</strong>"
} }
}, },
"title": { "title": {

View file

@ -3694,10 +3694,10 @@
}, },
"question": "Je tato ulice osvětlená?" "question": "Je tato ulice osvětlená?"
}, },
"width:carriageway": { "width": {
"question": "Jaká je šířka vozovky této silnice (v metrech)?", "question": "Jaká je šířka vozovky této silnice (v metrech)?",
"questionHint": "Jedná se o měření od krajnice ke krajnici a to včetně šířky paralelních parkovacích pruhů", "questionHint": "Jedná se o měření od krajnice ke krajnici a to včetně šířky paralelních parkovacích pruhů",
"render": "Šířka vozovky této silnice je <strong>{width:carriageway}m</strong>" "render": "Šířka vozovky této silnice je <strong>{width}m</strong>"
} }
}, },
"title": { "title": {

View file

@ -3958,10 +3958,10 @@
}, },
"question": "Ist diese Straße beleuchtet?" "question": "Ist diese Straße beleuchtet?"
}, },
"width:carriageway": { "width": {
"question": "Wie groß ist die Fahrbahnbreite dieser Straße (in Metern)?", "question": "Wie groß ist die Fahrbahnbreite dieser Straße (in Metern)?",
"questionHint": "Diese wird von Bordstein zu Bordstein gemessen und schließt daher die Breite von parallelen Parkspuren ein", "questionHint": "Diese wird von Bordstein zu Bordstein gemessen und schließt daher die Breite von parallelen Parkspuren ein",
"render": "Die Fahrbahnbreite dieser Straße beträgt <strong>{width:carriageway}m</strong>" "render": "Die Fahrbahnbreite dieser Straße beträgt <strong>{width}m</strong>"
} }
}, },
"title": { "title": {

View file

@ -4021,10 +4021,10 @@
}, },
"question": "Is this street lit?" "question": "Is this street lit?"
}, },
"width:carriageway": { "width": {
"question": "What is the carriage width of this road (in meters)?", "question": "What is the carriage width of this road (in meters)?",
"questionHint": "This is measured curb to curb and thus includes the width of parallell parking lanes", "questionHint": "This is measured curb to curb and thus includes the width of parallell parking lanes",
"render": "The carriage width of this road is <strong>{width:carriageway}m</strong>" "render": "The carriage width of this road is <strong>{width}m</strong>"
} }
}, },
"title": { "title": {
@ -9755,6 +9755,17 @@
}, },
"question": "Does this shop offer key cutting?" "question": "Does this shop offer key cutting?"
}, },
"optometrist_service": {
"mappings": {
"0": {
"then": "This shop offers eye exams by certified optometrists"
},
"1": {
"then": "This shop offers hearing tests by a certified audiologist"
}
},
"question": "Are medical services available here?"
},
"organic": { "organic": {
"mappings": { "mappings": {
"0": { "0": {

View file

@ -3950,10 +3950,10 @@
}, },
"question": "¿Está iluminada esta calle?" "question": "¿Está iluminada esta calle?"
}, },
"width:carriageway": { "width": {
"question": "¿Cuál es el ancho de la calzada de esta carretera (en metros)?", "question": "¿Cuál es el ancho de la calzada de esta carretera (en metros)?",
"questionHint": "Esto se mide de bordillo a bordillo e incluye el ancho de los carriles de aparcamiento paralelos", "questionHint": "Esto se mide de bordillo a bordillo e incluye el ancho de los carriles de aparcamiento paralelos",
"render": "El ancho de la calzada de esta carretera es de <strong>{width:carriageway}m</strong>" "render": "El ancho de la calzada de esta carretera es de <strong>{width}m</strong>"
} }
}, },
"title": { "title": {

View file

@ -2795,10 +2795,10 @@
}, },
"question": "Cette rue est-elle éclairée ?" "question": "Cette rue est-elle éclairée ?"
}, },
"width:carriageway": { "width": {
"question": "Quelle est la largeur de cette chaussée (en mètres) ?", "question": "Quelle est la largeur de cette chaussée (en mètres) ?",
"questionHint": "Elle est mesurée d'une bordure à l'autre et inclut donc la largeur des voies de stationnement parallèles", "questionHint": "Elle est mesurée d'une bordure à l'autre et inclut donc la largeur des voies de stationnement parallèles",
"render": "La largeur de cette chaussée est de <strong>{width:carriageway}m</strong>" "render": "La largeur de cette chaussée est de <strong>{width}m</strong>"
} }
}, },
"title": { "title": {

View file

@ -2049,6 +2049,9 @@
}, },
"title": { "title": {
"mappings": { "mappings": {
"0": {
"then": "{name}"
},
"1": { "1": {
"then": "Vogelkijkhut {name}" "then": "Vogelkijkhut {name}"
}, },
@ -3973,10 +3976,10 @@
}, },
"question": "Is deze weg verlicht?" "question": "Is deze weg verlicht?"
}, },
"width:carriageway": { "width": {
"question": "Hoe breed is de rijbaan in deze straat (in meters)?", "question": "Hoe breed is de rijbaan in deze straat (in meters)?",
"questionHint": "Dit is gemeten van stoepsteen tot stoepsteen, dus inclusief een parallelle parkeerstrook", "questionHint": "Dit is gemeten van stoepsteen tot stoepsteen, dus inclusief een parallelle parkeerstrook",
"render": "De breedte van deze rijbaan in deze straat is <strong>{width:carriageway}m</strong>" "render": "De breedte van deze rijbaan in deze straat is <strong>{width}m</strong>"
} }
}, },
"title": { "title": {
@ -6353,6 +6356,11 @@
} }
}, },
"title": { "title": {
"mappings": {
"0": {
"then": "{name}"
}
},
"render": "Natuurgebied" "render": "Natuurgebied"
} }
}, },
@ -6884,6 +6892,21 @@
"render": "Picknicktafel" "render": "Picknicktafel"
} }
}, },
"play_forest": {
"description": "Een speelbos is een vrij toegankelijke zone in een bos",
"name": "Speelbossen",
"title": {
"mappings": {
"0": {
"then": "{name}"
},
"1": {
"then": "Speelbos {name}"
}
},
"render": "Speelbos"
}
},
"playground": { "playground": {
"deletion": { "deletion": {
"nonDeleteMappings": { "nonDeleteMappings": {
@ -8315,6 +8338,17 @@
} }
} }
}, },
"optometrist_service": {
"mappings": {
"0": {
"then": "Hier kan men een oogtest door een erkende optometrist laten uitvoeren"
},
"1": {
"then": "HIer kan men een hoortest laten uitvoeren door een erkende audioloog"
}
},
"question": "Zijn hier medische services beschikbaar?"
},
"organic": { "organic": {
"mappings": { "mappings": {
"0": { "0": {
@ -8441,6 +8475,9 @@
}, },
"title": { "title": {
"mappings": { "mappings": {
"0": {
"then": "{name}"
},
"1": { "1": {
"then": "Voetpad" "then": "Voetpad"
}, },
@ -10593,13 +10630,25 @@
} }
}, },
"village_green": { "village_green": {
"description": "Een laag die dorpsgroen toont (gemeenschapsgroen, maar niet echt een park)" "description": "Een laag die dorpsgroen toont (gemeenschapsgroen, maar niet echt een park)",
"name": "Speelweide",
"title": {
"mappings": {
"0": {
"then": "{name}"
}
},
"render": "Speelweide"
}
}, },
"visitor_information_centre": { "visitor_information_centre": {
"description": "Een bezoekerscentrum biedt informatie over een specifieke attractie of bezienswaardigheid waar het is gevestigd.", "description": "Een bezoekerscentrum biedt informatie over een specifieke attractie of bezienswaardigheid waar het is gevestigd.",
"name": "Bezoekerscentrum", "name": "Bezoekerscentrum",
"title": { "title": {
"mappings": { "mappings": {
"0": {
"then": "{name:nl}"
},
"1": { "1": {
"then": "{name}" "then": "{name}"
} }
@ -10829,4 +10878,4 @@
"render": "windturbine" "render": "windturbine"
} }
} }
} }

View file

@ -653,8 +653,37 @@
"building type": { "building type": {
"question": "Wat voor soort gebouw is dit?" "question": "Wat voor soort gebouw is dit?"
}, },
"grb-fixme": {
"mappings": {
"0": {
"then": "Geen fixme"
}
},
"question": "Wat zegt de fixme?",
"render": "De fixme is <b>{fixme}</b>"
},
"grb-housenumber": {
"mappings": {
"0": {
"then": "Geen huisnummer"
}
},
"question": "Wat is het huisnummer?",
"render": "Het huisnummer is <b>{addr:housenumber}</b>"
},
"grb-min-level": {
"question": "Hoeveel verdiepingen ontbreken?",
"render": "Dit gebouw begint maar op de {building:min_level} verdieping"
},
"grb-reference": { "grb-reference": {
"render": "Werd geïmporteerd vanuit GRB, het referentienummer is {source:geometry:ref}" "render": "Werd geïmporteerd vanuit GRB, het referentienummer is {source:geometry:ref}"
},
"grb-street": {
"question": "Wat is de straat?",
"render": "De straat is <b>{addr:street}</b>"
},
"grb-unit": {
"render": "De wooneenheid-aanduiding is <b>{addr:unit}</b> "
} }
} }
}, },
@ -671,8 +700,35 @@
} }
} }
} }
},
"5": {
"override": {
"tagRenderings+": {
"0": {
"mappings": {
"0": {
"then": "Geen omliggend OSM-gebouw gevonden"
}
}
},
"3": {
"mappings": {
"0": {
"then": "Geen omliggend OSM-gebouw gevonden. Een omliggend gebouw is nodig om dit punt als adres punt toe te voegen. <div class=subtle>Importeer eerst de gebouwen. Vernieuw dan de pagina om losse adressen toe te voegen</div>"
}
},
"render": {
"special": {
"text": "Voeg dit adres als een nieuw adrespunt toe"
}
}
}
}
}
} }
} },
"shortDescription": "Grb import helper tool",
"title": "GRB import helper"
}, },
"guideposts": { "guideposts": {
"description": "Wegwijzers (ook wel handwijzer genoemd) zijn vaak te vinden langs officiële wandel-, fiets-, ski- of paardrijroutes om de richtingen naar verschillende bestemmingen aan te geven. Vaak zijn ze vernoemd naar een regio of plaats en geven ze de hoogte aan.\n\nDe positie van een wegwijzer kan door een wandelaar/fietser/renner/skiër worden gebruikt als bevestiging van de huidige positie, vooral als ze een gedrukte kaart zonder GPS-ontvanger gebruiken. ", "description": "Wegwijzers (ook wel handwijzer genoemd) zijn vaak te vinden langs officiële wandel-, fiets-, ski- of paardrijroutes om de richtingen naar verschillende bestemmingen aan te geven. Vaak zijn ze vernoemd naar een regio of plaats en geven ze de hoogte aan.\n\nDe positie van een wegwijzer kan door een wandelaar/fietser/renner/skiër worden gebruikt als bevestiging van de huidige positie, vooral als ze een gedrukte kaart zonder GPS-ontvanger gebruiken. ",
@ -1108,6 +1164,11 @@
}, },
"title": "Dierenartsen, hondenloopzones en andere huisdiervriendelijke plaatsen" "title": "Dierenartsen, hondenloopzones en andere huisdiervriendelijke plaatsen"
}, },
"play_forests": {
"description": "Een speelbos is een zone in een bos die vrij toegankelijk is voor spelende kinderen. Deze wordt in bossen van het Agentschap Natuur en bos altijd aangeduid met het overeenkomstige bord.",
"shortDescription": "Deze kaart toont speelbossen",
"title": "Speelbossen"
},
"playgrounds": { "playgrounds": {
"description": "Op deze kaart vind je speeltuinen en kan je zelf meer informatie en foto's toevoegen", "description": "Op deze kaart vind je speeltuinen en kan je zelf meer informatie en foto's toevoegen",
"shortDescription": "Een kaart met speeltuinen", "shortDescription": "Een kaart met speeltuinen",
@ -1181,6 +1242,47 @@
"description": "Alles om te skiën", "description": "Alles om te skiën",
"title": "Skipistes en kabelbanen" "title": "Skipistes en kabelbanen"
}, },
"speelplekken": {
"description": "<h3>Welkom bij de Groendoener!</h3>De Zuidrand dat is spelen, ravotten, chillen, wandelen,… in het groen. Meer dan <b>200 grote en kleine speelplekken</b> liggen er in parken, in bossen en op pleintjes te wachten om ontdekt te worden. De verschillende speelplekken werden getest én goedgekeurd door kinder- en jongerenreporters uit de Zuidrand. Met leuke challenges dagen de reporters jou uit om ook op ontdekking te gaan. Klik op een speelplek op de kaart, bekijk het filmpje en ga op verkenning!<br/><br/>Het project groendoener kadert binnen het strategisch project <a href='https://www.provincieantwerpen.be/aanbod/dlm/samenwerkingsverbanden/zuidrand/projecten/strategisch-project-beleefbare-open-ruimte.html' target='_blank'>Beleefbare Open Ruimte in de Antwerpse Zuidrand</a> en is een samenwerking tussen het departement Leefmilieu van provincie Antwerpen, Sportpret vzw, een OpenStreetMap-België Consultent en Createlli vzw. Het project kwam tot stand met steun van Departement Omgeving van de Vlaamse Overheid.<br/><img class='w-full md:w-1/2' src='./assets/themes/speelplekken/provincie_antwerpen.jpg'/><img class='w-full md:w-1/2' src='./assets/themes/speelplekken/Departement_Omgeving_Vlaanderen.png'/>",
"layers": {
"6": {
"name": "Wandelroutes van provincie Antwerpen",
"tagRenderings": {
"walk-description": {
"render": "<h3>Korte beschrijving:</h3>{description}"
},
"walk-length": {
"render": "Deze wandeling is <b>{_length:km}km</b> lang"
},
"walk-operator": {
"question": "Wie beheert deze wandeling en plaatst dus de signalisatiebordjes?"
},
"walk-operator-email": {
"question": "Naar wie kan men emailen bij problemen rond signalisatie?",
"render": "Bij problemen met signalisatie kan men emailen naar <a href='mailto:{operator:email}'>{operator:email}</a>"
},
"walk-type": {
"mappings": {
"0": {
"then": "Dit is een internationale wandelroute"
},
"1": {
"then": "Dit is een nationale wandelroute"
},
"2": {
"then": "Dit is een regionale wandelroute"
},
"3": {
"then": "Dit is een lokale wandelroute"
}
}
}
}
}
},
"shortDescription": "Speelplekken in de Antwerpse Zuidrand",
"title": "Welkom bij de groendoener!"
},
"sport_pitches": { "sport_pitches": {
"description": "Een sportveld is een ingerichte plaats met infrastructuur om een sport te beoefenen", "description": "Een sportveld is een ingerichte plaats met infrastructuur om een sport te beoefenen",
"shortDescription": "Deze kaart toont sportvelden", "shortDescription": "Deze kaart toont sportvelden",
@ -1301,6 +1403,10 @@
}, },
"title": "Straatverlichting" "title": "Straatverlichting"
}, },
"street_lighting_assen": {
"description": "Op deze kaart vind je alles over straatlantaarns + een dataset van Assen",
"title": "Straatverlichting - Assen"
},
"surveillance": { "surveillance": {
"description": "Op deze open kaart kan je bewakingscamera's vinden.", "description": "Op deze open kaart kan je bewakingscamera's vinden.",
"shortDescription": "Bewakingscameras en dergelijke", "shortDescription": "Bewakingscameras en dergelijke",
@ -1414,9 +1520,13 @@
"description": "Kaart met afvalbakken en recyclingfaciliteiten.", "description": "Kaart met afvalbakken en recyclingfaciliteiten.",
"title": "Afval" "title": "Afval"
}, },
"waste_assen": {
"description": "Kaart met afvalbakken en recyclingfaciliteiten + een dataset voor Assen.",
"title": "Afval - Assen"
},
"waste_basket": { "waste_basket": {
"description": "Op deze kaart vind je afvalbakken bij jou in de buurt. Als er een afvalbak ontbreekt op deze kaart, kun je deze zelf toevoegen", "description": "Op deze kaart vind je afvalbakken bij jou in de buurt. Als er een afvalbak ontbreekt op deze kaart, kun je deze zelf toevoegen",
"shortDescription": "Een kaart met vuilnisbakken", "shortDescription": "Een kaart met vuilnisbakken",
"title": "Vuilnisbakken" "title": "Vuilnisbakken"
} }
} }

View file

@ -77,7 +77,7 @@
} }
}, },
"scripts": { "scripts": {
"init": "npm ci && npm run prep:layeroverview && npm run generate && npm run download:editor-layer-index && npm run generate:layouts && npm run clean", "init": "npm ci && npm run prep:layeroverview && npm run download:editor-layer-index && npm run generate && npm run generate:layouts && npm run clean",
"start": "npm run generate:layeroverview && npm run strt", "start": "npm run generate:layeroverview && npm run strt",
"strt": "vite --host | sed 's/localhost:/127.0.0.1:/g'", "strt": "vite --host | sed 's/localhost:/127.0.0.1:/g'",
"build": "./scripts/build.sh", "build": "./scripts/build.sh",

View file

@ -24,6 +24,8 @@ else
exit 1 exit 1
fi fi
cp node_modules/name-suggestion-index/dist/nsi.json public/assets/data/nsi
cp node_modules/name-suggestion-index/dist/wikidata.min.json public/assets/data/nsi
export NODE_OPTIONS=--max-old-space-size=16000 export NODE_OPTIONS=--max-old-space-size=16000
which vite which vite

View file

@ -119,7 +119,7 @@ class AddIconSummary extends DesugaringStep<{ raw: LayerConfigJson; parsed: Laye
const pointRendering: PointRenderingConfig = layerConfig.mapRendering.find((pr) => const pointRendering: PointRenderingConfig = layerConfig.mapRendering.find((pr) =>
pr.location.has("point") pr.location.has("point")
) )
const defaultTags = layerConfig.GetBaseTags() const defaultTags = layerConfig.baseTags
fixed["_layerIcon"] = Utils.NoNull( fixed["_layerIcon"] = Utils.NoNull(
(pointRendering?.marker ?? []).map((i) => { (pointRendering?.marker ?? []).map((i) => {
const icon = i.icon?.GetRenderValue(defaultTags)?.txt const icon = i.icon?.GetRenderValue(defaultTags)?.txt

View file

@ -91,7 +91,6 @@ export default class AllImageProviders {
However, we override them if a custom image tag is set, e.g. 'image:menu' However, we override them if a custom image tag is set, e.g. 'image:menu'
*/ */
const prefixes = tagKey ?? imageProvider.defaultKeyPrefixes const prefixes = tagKey ?? imageProvider.defaultKeyPrefixes
console.log("Prefixes are", tagKey, prefixes)
const singleSource = tags.bindD((tags) => imageProvider.getRelevantUrls(tags, prefixes)) const singleSource = tags.bindD((tags) => imageProvider.getRelevantUrls(tags, prefixes))
allSources.push(singleSource) allSources.push(singleSource)
singleSource.addCallbackAndRunD((_) => { singleSource.addCallbackAndRunD((_) => {

View file

@ -503,7 +503,7 @@ export class OsmConnection {
(options.filename ?? "gpx_track_mapcomplete_" + new Date().toISOString()) + (options.filename ?? "gpx_track_mapcomplete_" + new Date().toISOString()) +
'"\r\nContent-Type: application/gpx+xml', '"\r\nContent-Type: application/gpx+xml',
} }
user
const boundary = "987654" const boundary = "987654"
let body = "" let body = ""

View file

@ -127,7 +127,9 @@ export default class OsmObjectDownloader {
* Beware: their geometry will be incomplete! * Beware: their geometry will be incomplete!
*/ */
public async DownloadReferencingWays(id: string): Promise<OsmWay[]> { public async DownloadReferencingWays(id: string): Promise<OsmWay[]> {
const data = await Utils.downloadJsonCached(`${this.backend}api/0.6/${id}/ways`, 60 * 1000) const data = await Utils.downloadJsonCached<{
elements: { id: number }[]
}>(`${this.backend}api/0.6/${id}/ways`, 60 * 1000)
return data.elements.map((wayInfo) => new OsmWay(wayInfo.id, wayInfo)) return data.elements.map((wayInfo) => new OsmWay(wayInfo.id, wayInfo))
} }
@ -136,7 +138,7 @@ export default class OsmObjectDownloader {
* Beware: their geometry will be incomplete! * Beware: their geometry will be incomplete!
*/ */
public async DownloadReferencingRelations(id: string): Promise<OsmRelation[]> { public async DownloadReferencingRelations(id: string): Promise<OsmRelation[]> {
const data = await Utils.downloadJsonCached( const data = await Utils.downloadJsonCached<{ elements: { id: number }[] }>(
`${this.backend}api/0.6/${id}/relations`, `${this.backend}api/0.6/${id}/relations`,
60 * 1000 60 * 1000
) )

View file

@ -38,14 +38,23 @@ export class OsmPreferences {
}) })
} }
private setPreferencesAll(key: string, value: string) { /**
* Sets a new preferenceValue in 'allPreferences'
* @param key
* @param value
* @param deferping: the end user will ping '_allPreferences'
* @private
*/
private setPreferencesAll(key: string, value: string, deferping = false) {
if (this._allPreferences.data[key] !== value) { if (this._allPreferences.data[key] !== value) {
this._allPreferences.data[key] = value this._allPreferences.data[key] = value
this._allPreferences.ping() if(!deferping){
this._allPreferences.ping()
}
} }
} }
private initPreference(key: string, value: string = undefined): UIEventSource<string> { private initPreference(key: string, value: string = undefined, deferPing = false): UIEventSource<string> {
if (this.preferences[key] !== undefined) { if (this.preferences[key] !== undefined) {
if (value !== undefined) { if (value !== undefined) {
this.preferences[key].set(value) this.preferences[key].set(value)
@ -54,12 +63,12 @@ export class OsmPreferences {
} }
const pref = (this.preferences[key] = new UIEventSource(value, "preference: " + key)) const pref = (this.preferences[key] = new UIEventSource(value, "preference: " + key))
if (value) { if (value) {
this.setPreferencesAll(key, value) this.setPreferencesAll(key, value, deferPing)
} }
pref.addCallback((v) => { pref.addCallback((v) => {
console.log("Got an update:", key, "--->", v) console.log("Got an update:", key, "--->", v)
this.uploadKvSplit(key, v) this.uploadKvSplit(key, v)
this.setPreferencesAll(key, v) this.setPreferencesAll(key, v, deferPing)
}) })
return pref return pref
} }
@ -73,11 +82,12 @@ export class OsmPreferences {
await this.removeLegacy(legacy) await this.removeLegacy(legacy)
} }
for (const key in merged) { for (const key in merged) {
this.initPreference(key, prefs[key]) this.initPreference(key, prefs[key], true)
} }
for (const key in legacy) { for (const key in legacy) {
this.initPreference(key, legacy[key]) this.initPreference(key, legacy[key], true)
} }
this._allPreferences.ping()
} }
public getPreference(key: string, defaultValue: string = undefined, prefix?: string) { public getPreference(key: string, defaultValue: string = undefined, prefix?: string) {

View file

@ -1,6 +1,3 @@
import * as nsi from "../../../node_modules/name-suggestion-index/dist/nsi.json"
import * as nsiWD from "../../../node_modules/name-suggestion-index/dist/wikidata.min.json"
import * as nsiFeatures from "../../../node_modules/name-suggestion-index/dist/featureCollection.json" import * as nsiFeatures from "../../../node_modules/name-suggestion-index/dist/featureCollection.json"
import { LocationConflation } from "@rapideditor/location-conflation" import { LocationConflation } from "@rapideditor/location-conflation"
import type { Feature, MultiPolygon } from "geojson" import type { Feature, MultiPolygon } from "geojson"
@ -56,27 +53,53 @@ export interface NSIItem {
} }
export default class NameSuggestionIndex { export default class NameSuggestionIndex {
private static readonly nsiFile: Readonly<NSIFile> = <any>nsi public static readonly supportedTypes = ["brand",
private static readonly nsiWdFile: Readonly< "flag",
"operator",
"transit"] as const
private readonly nsiFile: Readonly<NSIFile>
private readonly nsiWdFile: Readonly<
Record< Record<
string, string,
{ {
logos: { wikidata?: string; facebook?: string } logos: { wikidata?: string; facebook?: string }
} }
> >
> = <any>nsiWD["wikidata"] >
private static loco = new LocationConflation(nsiFeatures) // Some additional boundaries private static loco = new LocationConflation(nsiFeatures) // Some additional boundaries
private static _supportedTypes: string[] private _supportedTypes: string[]
public static supportedTypes(): string[] { constructor(nsiFile: Readonly<NSIFile>, nsiWdFile: Readonly<
Record<
string,
{
logos: { wikidata?: string; facebook?: string }
}
>>) {
this.nsiFile = nsiFile
this.nsiWdFile = nsiWdFile
}
private static inited: NameSuggestionIndex = undefined
public static async getNsiIndex(): Promise<NameSuggestionIndex> {
if (NameSuggestionIndex.inited) {
return NameSuggestionIndex.inited
}
const [nsi, nsiWd] = await Promise.all(["assets/data/nsi/nsi.json", "assets/data/nsi/wikidata.min.json"].map(url => Utils.downloadJsonCached(url, 1000 * 60 * 60 * 24 * 30)))
NameSuggestionIndex.inited = new NameSuggestionIndex(<any>nsi, <any>nsiWd["wikidata"])
return NameSuggestionIndex.inited
}
public supportedTypes(): string[] {
if (this._supportedTypes) { if (this._supportedTypes) {
return this._supportedTypes return this._supportedTypes
} }
const keys = Object.keys(NameSuggestionIndex.nsiFile.nsi) const keys = Object.keys(this.nsiFile.nsi)
const all = keys.map( const all = keys.map(
(k) => NameSuggestionIndex.nsiFile.nsi[k].properties.path.split("/")[0] (k) => this.nsiFile.nsi[k].properties.path.split("/")[0],
) )
this._supportedTypes = Utils.Dedup(all).map((s) => { this._supportedTypes = Utils.Dedup(all).map((s) => {
if (s.endsWith("s")) { if (s.endsWith("s")) {
@ -99,13 +122,13 @@ export default class NameSuggestionIndex {
try { try {
return Utils.downloadJsonCached<Record<string, number>>( return Utils.downloadJsonCached<Record<string, number>>(
`./assets/data/nsi/stats/${type}.${c.toUpperCase()}.json`, `./assets/data/nsi/stats/${type}.${c.toUpperCase()}.json`,
24 * 60 * 60 * 1000 24 * 60 * 60 * 1000,
) )
} catch (e) { } catch (e) {
console.error("Could not fetch " + type + " statistics due to", e) console.error("Could not fetch " + type + " statistics due to", e)
return undefined return undefined
} }
}) }),
) )
stats = Utils.NoNull(stats) stats = Utils.NoNull(stats)
if (stats.length === 1) { if (stats.length === 1) {
@ -123,7 +146,10 @@ export default class NameSuggestionIndex {
return merged return merged
} }
public static isSvg(nsiItem: NSIItem, type: string): boolean | undefined { public isSvg(nsiItem: NSIItem, type: string): boolean | undefined {
if (this.nsiWdFile === undefined) {
throw "nsiWdi file is not loaded, cannot determine if " + nsiItem.id + " has an SVG image"
}
const logos = this.nsiWdFile[nsiItem?.tags?.[type + ":wikidata"]]?.logos const logos = this.nsiWdFile[nsiItem?.tags?.[type + ":wikidata"]]?.logos
if (!logos) { if (!logos) {
return undefined return undefined
@ -138,7 +164,7 @@ export default class NameSuggestionIndex {
return false return false
} }
public static async generateMappings( public async generateMappings(
type: string, type: string,
tags: Record<string, string>, tags: Record<string, string>,
country: string[], country: string[],
@ -148,7 +174,7 @@ export default class NameSuggestionIndex {
* If set, sort by frequency instead of alphabetically * If set, sort by frequency instead of alphabetically
*/ */
sortByFrequency: boolean sortByFrequency: boolean
} },
): Promise<Mapping[]> { ): Promise<Mapping[]> {
const mappings: (Mapping & { frequency: number })[] = [] const mappings: (Mapping & { frequency: number })[] = []
const frequencies = await NameSuggestionIndex.fetchFrequenciesFor(type, country) const frequencies = await NameSuggestionIndex.fetchFrequenciesFor(type, country)
@ -157,12 +183,12 @@ export default class NameSuggestionIndex {
continue continue
} }
const value = tags[key] const value = tags[key]
const actualBrands = NameSuggestionIndex.getSuggestionsForKV( const actualBrands = this.getSuggestionsForKV(
type, type,
key, key,
value, value,
country.join(";"), country.join(";"),
location location,
) )
if (!actualBrands) { if (!actualBrands) {
continue continue
@ -177,7 +203,7 @@ export default class NameSuggestionIndex {
if (hasIcon) { if (hasIcon) {
// Using <img src=...> works fine without an extension for JPG and PNG, but _not_ svg :( // Using <img src=...> works fine without an extension for JPG and PNG, but _not_ svg :(
icon = "./assets/data/nsi/logos/" + nsiItem.id icon = "./assets/data/nsi/logos/" + nsiItem.id
if (NameSuggestionIndex.isSvg(nsiItem, type)) { if (this.isSvg(nsiItem, type)) {
icon = icon + ".svg" icon = icon + ".svg"
} }
} }
@ -207,13 +233,13 @@ export default class NameSuggestionIndex {
return mappings return mappings
} }
public static supportedTags( public supportedTags(
type: "operator" | "brand" | "flag" | "transit" | string type: "operator" | "brand" | "flag" | "transit" | string,
): Record<string, string[]> { ): Record<string, string[]> {
const tags: Record<string, string[]> = {} const tags: Record<string, string[]> = {}
const keys = Object.keys(NameSuggestionIndex.nsiFile.nsi) const keys = Object.keys(this.nsiFile.nsi)
for (const key of keys) { for (const key of keys) {
const nsiItem = NameSuggestionIndex.nsiFile.nsi[key] const nsiItem = this.nsiFile.nsi[key]
const path = nsiItem.properties.path const path = nsiItem.properties.path
const [osmType, osmkey, osmvalue] = path.split("/") const [osmType, osmkey, osmvalue] = path.split("/")
if (type !== osmType && type + "s" !== osmType) { if (type !== osmType && type + "s" !== osmType) {
@ -231,9 +257,9 @@ export default class NameSuggestionIndex {
* Returns a list of all brands/operators * Returns a list of all brands/operators
* @param type * @param type
*/ */
public static allPossible(type: "brand" | "operator"): NSIItem[] { public allPossible(type: "brand" | "operator"): NSIItem[] {
const options: NSIItem[] = [] const options: NSIItem[] = []
const tags = NameSuggestionIndex.supportedTags(type) const tags = this.supportedTags(type)
for (const osmKey in tags) { for (const osmKey in tags) {
const values = tags[osmKey] const values = tags[osmKey]
for (const osmValue of values) { for (const osmValue of values) {
@ -249,14 +275,14 @@ export default class NameSuggestionIndex {
* @param country: a string containing one or more country codes, separated by ";" * @param country: a string containing one or more country codes, separated by ";"
* @param location: center point of the feature, should be [lon, lat] * @param location: center point of the feature, should be [lon, lat]
*/ */
public static getSuggestionsFor( public getSuggestionsFor(
type: string, type: string,
tags: { key: string; value: string }[], tags: { key: string; value: string }[],
country: string = undefined, country: string = undefined,
location: [number, number] = undefined location: [number, number] = undefined,
): NSIItem[] { ): NSIItem[] {
return tags.flatMap((tag) => return tags.flatMap((tag) =>
this.getSuggestionsForKV(type, tag.key, tag.value, country, location) this.getSuggestionsForKV(type, tag.key, tag.value, country, location),
) )
} }
@ -274,15 +300,15 @@ export default class NameSuggestionIndex {
* @param country: a string containing one or more country codes, separated by ";" * @param country: a string containing one or more country codes, separated by ";"
* @param location: center point of the feature, should be [lon, lat] * @param location: center point of the feature, should be [lon, lat]
*/ */
public static getSuggestionsForKV( public getSuggestionsForKV(
type: string, type: string,
key: string, key: string,
value: string, value: string,
country: string = undefined, country: string = undefined,
location: [number, number] = undefined location: [number, number] = undefined,
): NSIItem[] { ): NSIItem[] {
const path = `${type}s/${key}/${value}` const path = `${type}s/${key}/${value}`
const entry = NameSuggestionIndex.nsiFile.nsi[path] const entry = this.nsiFile.nsi[path]
const countries = country?.split(";") ?? [] const countries = country?.split(";") ?? []
return entry?.items?.filter((i) => { return entry?.items?.filter((i) => {
if (i.locationSet.include.indexOf("001") >= 0) { if (i.locationSet.include.indexOf("001") >= 0) {
@ -312,8 +338,8 @@ export default class NameSuggestionIndex {
} }
const hasSpecial = const hasSpecial =
i.locationSet.include?.some((i) => i.endsWith(".geojson") || Array.isArray(i)) || i.locationSet.include?.some((i) => Array.isArray(i) || i.endsWith(".geojson")) ||
i.locationSet.exclude?.some((i) => i.endsWith(".geojson") || Array.isArray(i)) i.locationSet.exclude?.some((i) => Array.isArray(i) || i.endsWith(".geojson"))
if (!hasSpecial) { if (!hasSpecial) {
return false return false
} }
@ -335,4 +361,11 @@ export default class NameSuggestionIndex {
return false return false
}) })
} }
public static async generateMappings(key: string, tags: Exclude<Record<string, string>, undefined | null>, country: string[], center: [number, number], options: {
sortByFrequency: boolean
}): Promise<Mapping[]> {
const nsi = await NameSuggestionIndex.getNsiIndex()
return nsi.generateMappings(key, tags, country, center, options)
}
} }

View file

@ -1,17 +1,13 @@
import { DesugaringStep } from "./Conversion" import { DesugaringStep } from "./Conversion"
import { TagRenderingConfigJson } from "../Json/TagRenderingConfigJson" import { TagRenderingConfigJson } from "../Json/TagRenderingConfigJson"
import { LayerConfigJson } from "../Json/LayerConfigJson" import { LayerConfigJson } from "../Json/LayerConfigJson"
import { import { MappingConfigJson, QuestionableTagRenderingConfigJson } from "../Json/QuestionableTagRenderingConfigJson"
MappingConfigJson,
QuestionableTagRenderingConfigJson,
} from "../Json/QuestionableTagRenderingConfigJson"
import { ConversionContext } from "./ConversionContext" import { ConversionContext } from "./ConversionContext"
import { Translation } from "../../../UI/i18n/Translation" import { Translation } from "../../../UI/i18n/Translation"
import NameSuggestionIndex from "../../../Logic/Web/NameSuggestionIndex"
import { TagUtils } from "../../../Logic/Tags/TagUtils" import { TagUtils } from "../../../Logic/Tags/TagUtils"
import { Tag } from "../../../Logic/Tags/Tag"
import Validators from "../../../UI/InputElement/Validators" import Validators from "../../../UI/InputElement/Validators"
import { CheckTranslation } from "./Validation" import { CheckTranslation } from "./Validation"
import NameSuggestionIndex from "../../../Logic/Web/NameSuggestionIndex"
export class MiscTagRenderingChecks extends DesugaringStep<TagRenderingConfigJson> { export class MiscTagRenderingChecks extends DesugaringStep<TagRenderingConfigJson> {
private readonly _layerConfig: LayerConfigJson private readonly _layerConfig: LayerConfigJson
@ -197,11 +193,11 @@ export class MiscTagRenderingChecks extends DesugaringStep<TagRenderingConfigJso
} }
} }
if ( if (
this._layerConfig?.source?.osmTags && this._layerConfig?.source?.["osmTags"] &&
NameSuggestionIndex.supportedTypes().indexOf(json.freeform.key) >= 0 NameSuggestionIndex.supportedTypes.indexOf(<any> json.freeform.key) >= 0
) { ) {
const tags = TagUtils.TagD(this._layerConfig?.source?.osmTags)?.usedTags() const tags = TagUtils.TagD(this._layerConfig?.source?.["osmTags"])?.usedTags()
const suggestions = NameSuggestionIndex.getSuggestionsFor(json.freeform.key, tags) /* const suggestions = nameSuggestionIndexBundled.getSuggestionsFor(json.freeform.key, tags)
if (suggestions === undefined) { if (suggestions === undefined) {
context context
.enters("freeform", "type") .enters("freeform", "type")
@ -209,8 +205,8 @@ export class MiscTagRenderingChecks extends DesugaringStep<TagRenderingConfigJso
"No entry found in the 'Name Suggestion Index'. None of the 'osmSource'-tags match an entry in the NSI.\n\tOsmSource-tags are " + "No entry found in the 'Name Suggestion Index'. None of the 'osmSource'-tags match an entry in the NSI.\n\tOsmSource-tags are " +
tags.map((t) => new Tag(t.key, t.value).asHumanString()).join(" ; ") tags.map((t) => new Tag(t.key, t.value).asHumanString()).join(" ; ")
) )
} }*/
} else if (json.freeform.type === "nsi") { } else if (json.freeform["type"] === "nsi") {
context context
.enters("freeform", "type") .enters("freeform", "type")
.warn( .warn(

View file

@ -24,6 +24,9 @@ import { QuestionableTagRenderingConfigJson } from "./Json/QuestionableTagRender
import MarkdownUtils from "../../Utils/MarkdownUtils" import MarkdownUtils from "../../Utils/MarkdownUtils"
import { And } from "../../Logic/Tags/And" import { And } from "../../Logic/Tags/And"
import Combine from "../../UI/Base/Combine" import Combine from "../../UI/Base/Combine"
import SvelteUIElement from "../../UI/Base/SvelteUIElement"
import DynamicMarker from "../../UI/Map/DynamicMarker.svelte"
import { ImmutableStore } from "../../Logic/UIEventSource"
export default class LayerConfig extends WithContextLoader { export default class LayerConfig extends WithContextLoader {
public static readonly syncSelectionAllowed = ["no", "local", "theme-only", "global"] as const public static readonly syncSelectionAllowed = ["no", "local", "theme-only", "global"] as const
@ -67,6 +70,8 @@ export default class LayerConfig extends WithContextLoader {
public readonly popupInFloatover: boolean | string public readonly popupInFloatover: boolean | string
public readonly enableMorePrivacy: boolean public readonly enableMorePrivacy: boolean
public readonly baseTags: Readonly<Record<string, string>>
/** /**
* If this layer is based on another layer, this might be indicated here * If this layer is based on another layer, this might be indicated here
* @private * @private
@ -104,7 +109,7 @@ export default class LayerConfig extends WithContextLoader {
mercatorCrs: json.source["mercatorCrs"], mercatorCrs: json.source["mercatorCrs"],
idKey: json.source["idKey"], idKey: json.source["idKey"],
}, },
json.id json.id,
) )
} }
@ -124,7 +129,7 @@ export default class LayerConfig extends WithContextLoader {
if (json.calculatedTags !== undefined) { if (json.calculatedTags !== undefined) {
if (!official) { if (!official) {
console.warn( console.warn(
`Unofficial theme ${this.id} with custom javascript! This is a security risk` `Unofficial theme ${this.id} with custom javascript! This is a security risk`,
) )
} }
this.calculatedTags = [] this.calculatedTags = []
@ -194,7 +199,7 @@ export default class LayerConfig extends WithContextLoader {
tags: pr.tags.map((t) => TagUtils.SimpleTag(t)), tags: pr.tags.map((t) => TagUtils.SimpleTag(t)),
description: Translations.T( description: Translations.T(
pr.description, pr.description,
`${translationContext}.presets.${i}.description` `${translationContext}.presets.${i}.description`,
), ),
preciseInput: preciseInput, preciseInput: preciseInput,
exampleImages: pr.exampleImages, exampleImages: pr.exampleImages,
@ -208,7 +213,7 @@ export default class LayerConfig extends WithContextLoader {
if (json.lineRendering) { if (json.lineRendering) {
this.lineRendering = Utils.NoNull(json.lineRendering).map( this.lineRendering = Utils.NoNull(json.lineRendering).map(
(r, i) => new LineRenderingConfig(r, `${context}[${i}]`) (r, i) => new LineRenderingConfig(r, `${context}[${i}]`),
) )
} else { } else {
this.lineRendering = [] this.lineRendering = []
@ -216,7 +221,7 @@ export default class LayerConfig extends WithContextLoader {
if (json.pointRendering) { if (json.pointRendering) {
this.mapRendering = Utils.NoNull(json.pointRendering).map( this.mapRendering = Utils.NoNull(json.pointRendering).map(
(r, i) => new PointRenderingConfig(r, `${context}[${i}](${this.id})`) (r, i) => new PointRenderingConfig(r, `${context}[${i}](${this.id})`),
) )
} else { } else {
this.mapRendering = [] this.mapRendering = []
@ -228,7 +233,7 @@ export default class LayerConfig extends WithContextLoader {
r.location.has("centroid") || r.location.has("centroid") ||
r.location.has("projected_centerpoint") || r.location.has("projected_centerpoint") ||
r.location.has("start") || r.location.has("start") ||
r.location.has("end") r.location.has("end"),
) )
if ( if (
@ -250,7 +255,7 @@ export default class LayerConfig extends WithContextLoader {
Constants.priviliged_layers.indexOf(<any>this.id) < 0 && Constants.priviliged_layers.indexOf(<any>this.id) < 0 &&
this.source !== null /*library layer*/ && this.source !== null /*library layer*/ &&
!this.source?.geojsonSource?.startsWith( !this.source?.geojsonSource?.startsWith(
"https://api.openstreetmap.org/api/0.6/notes.json" "https://api.openstreetmap.org/api/0.6/notes.json",
) )
) { ) {
throw ( throw (
@ -269,7 +274,7 @@ export default class LayerConfig extends WithContextLoader {
typeof tr !== "string" && typeof tr !== "string" &&
tr["builtin"] === undefined && tr["builtin"] === undefined &&
tr["id"] === undefined && tr["id"] === undefined &&
tr["rewrite"] === undefined tr["rewrite"] === undefined,
) ?? [] ) ?? []
if (missingIds?.length > 0 && official) { if (missingIds?.length > 0 && official) {
console.error("Some tagRenderings of", this.id, "are missing an id:", missingIds) console.error("Some tagRenderings of", this.id, "are missing an id:", missingIds)
@ -280,8 +285,8 @@ export default class LayerConfig extends WithContextLoader {
(tr, i) => (tr, i) =>
new TagRenderingConfig( new TagRenderingConfig(
<QuestionableTagRenderingConfigJson>tr, <QuestionableTagRenderingConfigJson>tr,
this.id + ".tagRenderings[" + i + "]" this.id + ".tagRenderings[" + i + "]",
) ),
) )
if (json.units !== undefined && !Array.isArray(json.units)) { if (json.units !== undefined && !Array.isArray(json.units)) {
throw ( throw (
@ -291,7 +296,7 @@ export default class LayerConfig extends WithContextLoader {
) )
} }
this.units = (json.units ?? []).flatMap((unitJson, i) => this.units = (json.units ?? []).flatMap((unitJson, i) =>
Unit.fromJson(unitJson, this.tagRenderings, `${context}.unit[${i}]`) Unit.fromJson(unitJson, this.tagRenderings, `${context}.unit[${i}]`),
) )
if ( if (
@ -352,31 +357,18 @@ export default class LayerConfig extends WithContextLoader {
) )
} }
this.popupInFloatover = json.popupInFloatover ?? false this.popupInFloatover = json.popupInFloatover ?? false
} this.baseTags = TagUtils.changeAsProperties(
this.source?.osmTags?.asChange({ id: "node/-1" }) ?? [{ k: "id", v: "node/-1" }],
public defaultIcon(properties?: Record<string, string>): BaseUIElement | undefined {
if (this.mapRendering === undefined || this.mapRendering === null) {
return undefined
}
const mapRenderings = this.mapRendering.filter((r) => r.location.has("point"))
if (mapRenderings.length === 0) {
return undefined
}
return new Combine(
mapRenderings.map((mr) =>
mr
.GetBaseIcon(properties ?? this.GetBaseTags())
.SetClass("absolute left-0 top-0 w-full h-full")
)
).SetClass("relative block w-full h-full")
}
public GetBaseTags(): Record<string, string> {
return TagUtils.changeAsProperties(
this.source?.osmTags?.asChange({ id: "node/-1" }) ?? [{ k: "id", v: "node/-1" }]
) )
} }
public hasDefaultIcon() {
if (this.mapRendering === undefined || this.mapRendering === null) {
return false
}
return this.mapRendering.some((r) => r.location.has("point"))
}
public GenerateDocumentation( public GenerateDocumentation(
usedInThemes: string[], usedInThemes: string[],
layerIsNeededBy?: Map<string, string[]>, layerIsNeededBy?: Map<string, string[]>,
@ -386,7 +378,7 @@ export default class LayerConfig extends WithContextLoader {
neededLayer: string neededLayer: string
}[] = [], }[] = [],
addedByDefault = false, addedByDefault = false,
canBeIncluded = true canBeIncluded = true,
): string { ): string {
const extraProps: string[] = [] const extraProps: string[] = []
extraProps.push("This layer is shown at zoomlevel **" + this.minzoom + "** and higher") extraProps.push("This layer is shown at zoomlevel **" + this.minzoom + "** and higher")
@ -394,32 +386,32 @@ export default class LayerConfig extends WithContextLoader {
if (canBeIncluded) { if (canBeIncluded) {
if (addedByDefault) { if (addedByDefault) {
extraProps.push( extraProps.push(
"**This layer is included automatically in every theme. This layer might contain no points**" "**This layer is included automatically in every theme. This layer might contain no points**",
) )
} }
if (this.shownByDefault === false) { if (this.shownByDefault === false) {
extraProps.push( extraProps.push(
"This layer is not visible by default and must be enabled in the filter by the user. " "This layer is not visible by default and must be enabled in the filter by the user. ",
) )
} }
if (this.title === undefined) { if (this.title === undefined) {
extraProps.push( extraProps.push(
"Elements don't have a title set and cannot be toggled nor will they show up in the dashboard. If you import this layer in your theme, override `title` to make this toggleable." "Elements don't have a title set and cannot be toggled nor will they show up in the dashboard. If you import this layer in your theme, override `title` to make this toggleable.",
) )
} }
if (this.name === undefined && this.shownByDefault === false) { if (this.name === undefined && this.shownByDefault === false) {
extraProps.push( extraProps.push(
"This layer is not visible by default and the visibility cannot be toggled, effectively resulting in a fully hidden layer. This can be useful, e.g. to calculate some metatags. If you want to render this layer (e.g. for debugging), enable it by setting the URL-parameter layer-<id>=true" "This layer is not visible by default and the visibility cannot be toggled, effectively resulting in a fully hidden layer. This can be useful, e.g. to calculate some metatags. If you want to render this layer (e.g. for debugging), enable it by setting the URL-parameter layer-<id>=true",
) )
} }
if (this.name === undefined) { if (this.name === undefined) {
extraProps.push( extraProps.push(
"Not visible in the layer selection by default. If you want to make this layer toggable, override `name`" "Not visible in the layer selection by default. If you want to make this layer toggable, override `name`",
) )
} }
if (this.mapRendering.length === 0) { if (this.mapRendering.length === 0) {
extraProps.push( extraProps.push(
"Not rendered on the map by default. If you want to rendering this on the map, override `mapRenderings`" "Not rendered on the map by default. If you want to rendering this on the map, override `mapRenderings`",
) )
} }
@ -429,12 +421,12 @@ export default class LayerConfig extends WithContextLoader {
"<img src='../warning.svg' height='1rem'/>", "<img src='../warning.svg' height='1rem'/>",
"This layer is loaded from an external source, namely ", "This layer is loaded from an external source, namely ",
"`" + this.source.geojsonSource + "`", "`" + this.source.geojsonSource + "`",
].join("\n\n") ].join("\n\n"),
) )
} }
} else { } else {
extraProps.push( extraProps.push(
"This layer can **not** be included in a theme. It is solely used by [special renderings](SpecialRenderings.md) showing a minimap with custom data." "This layer can **not** be included in a theme. It is solely used by [special renderings](SpecialRenderings.md) showing a minimap with custom data.",
) )
} }
@ -444,7 +436,7 @@ export default class LayerConfig extends WithContextLoader {
usingLayer = [ usingLayer = [
"## Themes using this layer", "## Themes using this layer",
MarkdownUtils.list( MarkdownUtils.list(
(usedInThemes ?? []).map((id) => `[${id}](https://mapcomplete.org/${id})`) (usedInThemes ?? []).map((id) => `[${id}](https://mapcomplete.org/${id})`),
), ),
] ]
} else if (this.source !== null) { } else if (this.source !== null) {
@ -460,7 +452,7 @@ export default class LayerConfig extends WithContextLoader {
" into the layout as it depends on it: ", " into the layout as it depends on it: ",
dep.reason, dep.reason,
"(" + dep.context + ")", "(" + dep.context + ")",
].join(" ") ].join(" "),
) )
} }
@ -487,7 +479,7 @@ export default class LayerConfig extends WithContextLoader {
new And(preset.tags).asHumanString(true) + new And(preset.tags).asHumanString(true) +
snaps snaps
) )
}) }),
), ),
] ]
} }
@ -495,8 +487,8 @@ export default class LayerConfig extends WithContextLoader {
for (const revDep of Utils.Dedup(layerIsNeededBy?.get(this.id) ?? [])) { for (const revDep of Utils.Dedup(layerIsNeededBy?.get(this.id) ?? [])) {
extraProps.push( extraProps.push(
["This layer is needed as dependency for layer", `[${revDep}](#${revDep})`].join( ["This layer is needed as dependency for layer", `[${revDep}](#${revDep})`].join(
" " " ",
) ),
) )
} }
@ -507,10 +499,10 @@ export default class LayerConfig extends WithContextLoader {
.filter((values) => values.key !== "id") .filter((values) => values.key !== "id")
.map((values) => { .map((values) => {
const embedded: string[] = values.values?.map((v) => const embedded: string[] = values.values?.map((v) =>
Link.OsmWiki(values.key, v, true).SetClass("mr-2").AsMarkdown() Link.OsmWiki(values.key, v, true).SetClass("mr-2").AsMarkdown(),
) ?? ["_no preset options defined, or no values in them_"] ) ?? ["_no preset options defined, or no values in them_"]
const statistics = `https://taghistory.raifer.tech/?#***/${encodeURIComponent( const statistics = `https://taghistory.raifer.tech/?#***/${encodeURIComponent(
values.key values.key,
)}/` )}/`
const tagInfo = `https://taginfo.openstreetmap.org/keys/${values.key}#values` const tagInfo = `https://taginfo.openstreetmap.org/keys/${values.key}#values`
return [ return [
@ -525,7 +517,7 @@ export default class LayerConfig extends WithContextLoader {
: `[${values.type}](../SpecialInputElements.md#${values.type})`, : `[${values.type}](../SpecialInputElements.md#${values.type})`,
embedded.join(" "), embedded.join(" "),
] ]
}) }),
) )
let quickOverview: string[] = [] let quickOverview: string[] = []
@ -535,7 +527,7 @@ export default class LayerConfig extends WithContextLoader {
"this quick overview is incomplete", "this quick overview is incomplete",
MarkdownUtils.table( MarkdownUtils.table(
["attribute", "type", "values which are supported by this layer"], ["attribute", "type", "values which are supported by this layer"],
tableRows tableRows,
), ),
] ]
} }
@ -569,19 +561,19 @@ export default class LayerConfig extends WithContextLoader {
const parts = neededTags["and"] const parts = neededTags["and"]
tagsDescription.push( tagsDescription.push(
"Elements must match **all** of the following expressions:", "Elements must match **all** of the following expressions:",
parts.map((p, i) => i + ". " + p.asHumanString(true, false, {})).join("\n") parts.map((p, i) => i + ". " + p.asHumanString(true, false, {})).join("\n"),
) )
} else if (neededTags["or"]) { } else if (neededTags["or"]) {
const parts = neededTags["or"] const parts = neededTags["or"]
tagsDescription.push( tagsDescription.push(
"Elements must match **any** of the following expressions:", "Elements must match **any** of the following expressions:",
parts.map((p) => " - " + p.asHumanString(true, false, {})).join("\n") parts.map((p) => " - " + p.asHumanString(true, false, {})).join("\n"),
) )
} else { } else {
tagsDescription.push( tagsDescription.push(
"Elements must match the expression **" + "Elements must match the expression **" +
neededTags.asHumanString(true, false, {}) + neededTags.asHumanString(true, false, {}) +
"**" "**",
) )
} }

View file

@ -143,15 +143,6 @@ export default class PointRenderingConfig extends WithContextLoader {
"w-full h-full block absolute top-0 left-0" "w-full h-full block absolute top-0 left-0"
) )
} }
public GetBaseIcon(tags?: Record<string, string>): BaseUIElement {
return new SvelteUIElement(DynamicMarker, {
marker: this.marker,
rotation: this.rotation,
tags: new ImmutableStore(tags),
})
}
public RenderIcon( public RenderIcon(
tags: Store<Record<string, string>>, tags: Store<Record<string, string>>,
options?: { options?: {

View file

@ -999,7 +999,7 @@ export class TagRenderingConfigUtils {
tags: UIEventSource<Record<string, string>>, tags: UIEventSource<Record<string, string>>,
feature?: Feature feature?: Feature
): Store<TagRenderingConfig> { ): Store<TagRenderingConfig> {
const isNSI = NameSuggestionIndex.supportedTypes().indexOf(config.freeform?.key) >= 0 const isNSI = NameSuggestionIndex.supportedTypes.indexOf(<any> config.freeform?.key) >= 0
if (!isNSI) { if (!isNSI) {
return new ImmutableStore(config) return new ImmutableStore(config)
} }
@ -1019,8 +1019,8 @@ export class TagRenderingConfigUtils {
) )
) )
}) })
return extraMappings.map((extraMappings) => { return extraMappings.mapD((extraMappings) => {
if (!extraMappings || extraMappings.length == 0) { if (extraMappings.length == 0) {
return config return config
} }
const clone: TagRenderingConfig = Object.create(config) const clone: TagRenderingConfig = Object.create(config)

View file

@ -89,7 +89,7 @@
} }
let officialSearched: Store<MinimalThemeInformation[]> = filtered( let officialSearched: Store<MinimalThemeInformation[]> = filtered(
new ImmutableStore(officialThemes) osmConnection.isLoggedIn.map(loggedIn => loggedIn ? officialThemes : officialThemes.filter(th => th.id !== "personal"))
) )
let hiddenSearched: Store<MinimalThemeInformation[]> = filtered(visitedHiddenThemes) let hiddenSearched: Store<MinimalThemeInformation[]> = filtered(visitedHiddenThemes)
let customSearched: Store<MinimalThemeInformation[]> = filtered(customThemes) let customSearched: Store<MinimalThemeInformation[]> = filtered(customThemes)
@ -102,6 +102,9 @@
} }
}) })
/**
* Opens the first search candidate
*/
function applySearch() { function applySearch() {
const didRedirect = SearchUtils.applySpecialSearch(search.data) const didRedirect = SearchUtils.applySpecialSearch(search.data)
if (didRedirect) { if (didRedirect) {

View file

@ -5,16 +5,18 @@
/** /**
* For some stupid reason, it is very hard to let {#if} work together with UIEventSources, so we wrap then here * For some stupid reason, it is very hard to let {#if} work together with UIEventSources, so we wrap then here
*/ */
export let condition: Store<boolean> export let condition: Store<boolean> | undefined
let _c = condition.data let _c = condition?.data
onDestroy( if (condition !== undefined) {
condition.addCallback((c) => { onDestroy(
/* Do _not_ abbreviate this as `.addCallback(c => _c = c)`. This is the same as writing `.addCallback(c => {return _c = c})`, condition.addCallback((c) => {
which will _unregister_ the callback if `c = true`! */ /* Do _not_ abbreviate this as `.addCallback(c => _c = c)`. This is the same as writing `.addCallback(c => {return _c = c})`,
_c = c which will _unregister_ the callback if `c = true`! */
return false _c = c
}) return false
) })
)
}
</script> </script>
{#if _c} {#if _c}

View file

@ -29,6 +29,7 @@
html?.remove() html?.remove()
uiElement?.Destroy() uiElement?.Destroy()
}) })
</script> </script>
{#if isSvelte} {#if isSvelte}

View file

@ -14,6 +14,7 @@
import Translations from "../i18n/Translations" import Translations from "../i18n/Translations"
import type { SpecialVisualizationState } from "../SpecialVisualization" import type { SpecialVisualizationState } from "../SpecialVisualization"
import Constants from "../../Models/Constants" import Constants from "../../Models/Constants"
import DefaultIcon from "../Map/DefaultIcon.svelte"
export let state: SpecialVisualizationState export let state: SpecialVisualizationState
export let filteredLayer: FilteredLayer export let filteredLayer: FilteredLayer
@ -58,7 +59,7 @@
{#if showLayerTitle} {#if showLayerTitle}
<Checkbox selected={isDisplayed}> <Checkbox selected={isDisplayed}>
<div class="no-image-background block h-6 w-6" class:opacity-50={!$isDisplayed}> <div class="no-image-background block h-6 w-6" class:opacity-50={!$isDisplayed}>
<ToSvelte construct={() => layer.defaultIcon()} /> <DefaultIcon {layer}/>
</div> </div>
<Tr t={filteredLayer.layerDef.name} /> <Tr t={filteredLayer.layerDef.name} />

View file

@ -10,6 +10,7 @@
import ToSvelte from "../Base/ToSvelte.svelte" import ToSvelte from "../Base/ToSvelte.svelte"
import Tr from "../Base/Tr.svelte" import Tr from "../Base/Tr.svelte"
import Translations from "../i18n/Translations" import Translations from "../i18n/Translations"
import DefaultIcon from "../Map/DefaultIcon.svelte"
export let onlyShowChangesBy: string[] export let onlyShowChangesBy: string[]
export let id: OsmId export let id: OsmId
@ -58,7 +59,7 @@
<a href={"https://openstreetmap.org/" + $lastStep.step.tags.id} target="_blank"> <a href={"https://openstreetmap.org/" + $lastStep.step.tags.id} target="_blank">
<h3 class="flex items-center gap-x-2"> <h3 class="flex items-center gap-x-2">
<div class="inline-block h-8 w-8 shrink-0"> <div class="inline-block h-8 w-8 shrink-0">
<ToSvelte construct={$lastStep.layer?.defaultIcon($lastStep.step.tags)} /> <DefaultIcon layer={$lastStep.layer} />
</div> </div>
<Tr <Tr
t={$lastStep.layer?.title?.GetRenderValue($lastStep.step.tags)?.Subs($lastStep.step.tags)} t={$lastStep.layer?.title?.GetRenderValue($lastStep.step.tags)?.Subs($lastStep.step.tags)}

View file

@ -57,6 +57,7 @@
<td> <td>
<button class="as-link cursor-pointer" on:click={() => sort("visitedTime")}> <button class="as-link cursor-pointer" on:click={() => sort("visitedTime")}>
<Tr t={t.time} /> <Tr t={t.time} />
</button> </button>
</td> </td>
<td> <td>
@ -95,6 +96,7 @@
<div slot="header">Labels</div> <div slot="header">Labels</div>
{#if $labels.length === 0} {#if $labels.length === 0}
<Tr t={t.noLabels} /> <Tr t={t.noLabels} />
{:else} {:else}
{#each $labels as label} {#each $labels as label}
<div class="mx-2"> <div class="mx-2">

View file

@ -3,5 +3,5 @@ import InspectorGUI from "./InspectorGUI.svelte"
const target = document.getElementById("main") const target = document.getElementById("main")
target.innerHTML = "" target.innerHTML = ""
new InspectorGUI({ new InspectorGUI({
target, target
}) })

View file

@ -0,0 +1,27 @@
<script lang="ts">
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
import DynamicIcon from "./DynamicIcon.svelte"
import DynamicMarker from "./DynamicMarker.svelte"
import Marker from "./Marker.svelte"
import { ImmutableStore } from "../../Logic/UIEventSource"
/**
* The 'DefaultIcon' is the icon that a layer shows by default
* Used e.g. in the filterview
*/
export let layer: LayerConfig
export let properties: Readonly<Record<string, string>> = layer.baseTags
export let clss= ""
let tags = new ImmutableStore(properties)
let mapRenderings = layer.mapRendering?.filter((r) => r.location.has("point"))
</script>
{#if mapRenderings?.length > 0}
<div class={"relative block w-full h-full "+clss}>
{#each mapRenderings as mr}
<DynamicMarker marker={mr.marker} rotation={mr.rotation} {tags} />
{/each}
</div>
{/if}

View file

@ -24,7 +24,7 @@
} }
</script> </script>
{#if marker && marker} {#if marker}
<div class="relative h-full w-full" style={`transform: rotate(${$_rotation})`}> <div class="relative h-full w-full" style={`transform: rotate(${$_rotation})`}>
{#each marker as icon} {#each marker as icon}
<div class="absolute top-0 left-0 h-full w-full"> <div class="absolute top-0 left-0 h-full w-full">

View file

@ -2,21 +2,26 @@
import Tr from "./Base/Tr.svelte" import Tr from "./Base/Tr.svelte"
import Translations from "./i18n/Translations.ts" import Translations from "./i18n/Translations.ts"
import BackButton from "./Base/BackButton.svelte" import BackButton from "./Base/BackButton.svelte"
import Not_found from "../assets/svg/Not_found.svelte"
import World from "../assets/svg/World.svelte"
console.log("???") console.log("???")
</script> </script>
<main> <div class="flex flex-col items-center justify-center w-full h-full p-8">
<div class="flex flex-col"> <div class="flex flex-col items-center">
<Tr t={Translations.t.general["404"]} /> <World style="height: 200px" />
<BackButton <h1>
clss="m-8" <Tr t={Translations.t.general["404"]} />
on:click={() => { </h1>
</div>
<BackButton
on:click={() => {
window.location = "index.html" window.location = "index.html"
}} }}
> >
<div class="flex w-full justify-center"> <div class="flex w-full justify-center">
<Tr t={Translations.t.general.backToIndex} /> <Tr t={Translations.t.general.backToIndex} />
</div> </div>
</BackButton> </BackButton>
</div> </div>
</main>

View file

@ -43,14 +43,13 @@ export class DeleteFlowState {
console.log("Checking deleteability (internet?", useTheInternet, ")") console.log("Checking deleteability (internet?", useTheInternet, ")")
const t = Translations.t.delete const t = Translations.t.delete
const id = this._id const id = this._id
const self = this
if (!id.startsWith("node")) { if (!id.startsWith("node")) {
this.canBeDeleted.setData(false) this.canBeDeleted.setData(false)
this.canBeDeletedReason.setData(t.isntAPoint) this.canBeDeletedReason.setData(t.isntAPoint)
return return
} }
// Does the currently logged in user have enough experience to delete this point? // Does the currently logged-in user have enough experience to delete this point?
const deletingPointsOfOtherAllowed = this._osmConnection.userDetails.map((ud) => { const deletingPointsOfOtherAllowed = this._osmConnection.userDetails.map((ud) => {
if (ud === undefined) { if (ud === undefined) {
return undefined return undefined
@ -74,10 +73,10 @@ export class DeleteFlowState {
// Not yet downloaded // Not yet downloaded
return null return null
} }
const userId = self._osmConnection.userDetails.data.uid const userId = this._osmConnection.userDetails.data.uid
return !previous.some((editor) => editor !== userId) return !previous.some((editor) => editor !== userId)
}, },
[self._osmConnection.userDetails] [this._osmConnection.userDetails]
) )
// User allowed OR only edited by self? // User allowed OR only edited by self?
@ -96,14 +95,13 @@ export class DeleteFlowState {
if (allByMyself.data === null && useTheInternet) { if (allByMyself.data === null && useTheInternet) {
// We kickoff the download here as it hasn't yet been downloaded. Note that this is mapped onto 'all by myself' above // We kickoff the download here as it hasn't yet been downloaded. Note that this is mapped onto 'all by myself' above
const hist = this.objectDownloader UIEventSource.FromPromise(this.objectDownloader
.downloadHistory(id) .downloadHistory(id))
.map((versions) => .mapD((versions) =>
versions.map((version) => versions.map((version) =>
Number(version.tags["_last_edit:contributor:uid"]) Number(version.tags["_last_edit:contributor:uid"])
) )
) ).addCallbackAndRunD((hist) => previousEditors.setData(hist))
hist.addCallbackAndRunD((hist) => previousEditors.setData(hist))
} }
if (allByMyself.data === true) { if (allByMyself.data === true) {

View file

@ -8,6 +8,7 @@
import { Translation } from "../i18n/Translation" import { Translation } from "../i18n/Translation"
import { XMarkIcon } from "@babeard/svelte-heroicons/mini" import { XMarkIcon } from "@babeard/svelte-heroicons/mini"
import ToSvelte from "../Base/ToSvelte.svelte" import ToSvelte from "../Base/ToSvelte.svelte"
import DefaultIcon from "../Map/DefaultIcon.svelte"
export let layer: LayerConfig export let layer: LayerConfig
export let state: ThemeViewState export let state: ThemeViewState
@ -28,7 +29,7 @@
<div class="low-interaction p-2"> <div class="low-interaction p-2">
<h4 class="my-2 flex"> <h4 class="my-2 flex">
<div class="no-image-background block h-6 w-6"> <div class="no-image-background block h-6 w-6">
<ToSvelte construct={() => layer.defaultIcon()} /> <DefaultIcon {layer}/>
</div> </div>
<Tr t={layer.name} /> <Tr t={layer.name} />
</h4> </h4>

View file

@ -12,7 +12,6 @@
import Translations from "../../i18n/Translations.js" import Translations from "../../i18n/Translations.js"
import { Utils } from "../../../Utils" import { Utils } from "../../../Utils"
import { onDestroy } from "svelte" import { onDestroy } from "svelte"
import TagRenderingQuestion from "./TagRenderingQuestion.svelte"
import TagRenderingQuestionDynamic from "./TagRenderingQuestionDynamic.svelte" import TagRenderingQuestionDynamic from "./TagRenderingQuestionDynamic.svelte"
export let layer: LayerConfig export let layer: LayerConfig
@ -54,6 +53,7 @@
let skippedQuestions = new UIEventSource<Set<string>>(new Set<string>()) let skippedQuestions = new UIEventSource<Set<string>>(new Set<string>())
let layerDisabledForTheme = state.userRelatedState.getThemeDisabled(state.theme.id, layer.id) let layerDisabledForTheme = state.userRelatedState.getThemeDisabled(state.theme.id, layer.id)
layerDisabledForTheme.addCallbackAndRunD((disabled) => { layerDisabledForTheme.addCallbackAndRunD((disabled) => {
console.log("Disabled questions are ", disabled)
skippedQuestions.set(new Set(disabled.concat(Array.from(skippedQuestions.data)))) skippedQuestions.set(new Set(disabled.concat(Array.from(skippedQuestions.data))))
}) })
let questionboxElem: HTMLDivElement let questionboxElem: HTMLDivElement

View file

@ -49,9 +49,13 @@
function createVisualisation(specpart: Exclude<RenderingSpecification, string>): BaseUIElement { function createVisualisation(specpart: Exclude<RenderingSpecification, string>): BaseUIElement {
{ {
try { try {
return specpart.func const uiEl = specpart.func
.constr(state, tags, specpart.args, feature, layer) .constr(state, tags, specpart.args, feature, layer)
?.SetClass(specpart.style) ?.SetClass(specpart.style)
if (uiEl === undefined) {
console.error("Invalid special translation")
}
return uiEl
} catch (e) { } catch (e) {
console.error( console.error(
"Could not construct a special visualisation with specification", "Could not construct a special visualisation with specification",

View file

@ -7,6 +7,7 @@
import { UIEventSource } from "../../../Logic/UIEventSource" import { UIEventSource } from "../../../Logic/UIEventSource"
import LayerConfig from "../../../Models/ThemeConfig/LayerConfig" import LayerConfig from "../../../Models/ThemeConfig/LayerConfig"
import TagRenderingAnswer from "./TagRenderingAnswer.svelte" import TagRenderingAnswer from "./TagRenderingAnswer.svelte"
import Loading from "../../Base/Loading.svelte"
export let tags: UIEventSource<Record<string, string> | undefined> export let tags: UIEventSource<Record<string, string> | undefined>
@ -20,12 +21,16 @@
let dynamicConfig = TagRenderingConfigUtils.withNameSuggestionIndex(config, tags, selectedElement) let dynamicConfig = TagRenderingConfigUtils.withNameSuggestionIndex(config, tags, selectedElement)
</script> </script>
<TagRenderingAnswer {#if $dynamicConfig === undefined}
{selectedElement} <Loading />
{layer} {:else}
config={$dynamicConfig} <TagRenderingAnswer
{extraClasses} {selectedElement}
{id} {layer}
{tags} config={$dynamicConfig}
{state} {extraClasses}
/> {id}
{tags}
{state}
/>
{/if}

View file

@ -7,6 +7,7 @@
import type { SpecialVisualizationState } from "../../SpecialVisualization" import type { SpecialVisualizationState } from "../../SpecialVisualization"
import LayerConfig from "../../../Models/ThemeConfig/LayerConfig" import LayerConfig from "../../../Models/ThemeConfig/LayerConfig"
import TagRenderingEditable from "./TagRenderingEditable.svelte" import TagRenderingEditable from "./TagRenderingEditable.svelte"
import Loading from "../../Base/Loading.svelte"
export let config: TagRenderingConfig export let config: TagRenderingConfig
export let tags: UIEventSource<Record<string, string>> export let tags: UIEventSource<Record<string, string>>
@ -23,14 +24,18 @@
let dynamicConfig = TagRenderingConfigUtils.withNameSuggestionIndex(config, tags, selectedElement) let dynamicConfig = TagRenderingConfigUtils.withNameSuggestionIndex(config, tags, selectedElement)
</script> </script>
<TagRenderingEditable {#if $dynamicConfig}
config={$dynamicConfig} <TagRenderingEditable
{editMode} config={$dynamicConfig}
{clss} {editMode}
{highlightedRendering} {clss}
{editingEnabled} {highlightedRendering}
{layer} {editingEnabled}
{state} {layer}
{selectedElement} {state}
{tags} {selectedElement}
/> {tags}
/>
{:else}
<Loading />
{/if}

View file

@ -15,6 +15,7 @@
import SvelteUIElement from "../../Base/SvelteUIElement" import SvelteUIElement from "../../Base/SvelteUIElement"
import Icon from "../../Map/Icon.svelte" import Icon from "../../Map/Icon.svelte"
import { TagsFilter } from "../../../Logic/Tags/TagsFilter" import { TagsFilter } from "../../../Logic/Tags/TagsFilter"
import DefaultIcon from "../../Map/DefaultIcon.svelte"
export let selectedElement: Feature export let selectedElement: Feature
export let tags: UIEventSource<Record<string, string>> export let tags: UIEventSource<Record<string, string>>
@ -27,6 +28,7 @@
*/ */
export let clss: string = "ml-2" export let clss: string = "ml-2"
export let mapping: { export let mapping: {
readonly if?: TagsFilter
readonly then: Translation readonly then: Translation
readonly searchTerms?: Record<string, string[]> readonly searchTerms?: Record<string, string[]>
readonly icon?: string readonly icon?: string
@ -46,13 +48,13 @@
large: "5rem", large: "5rem",
} }
function getAutoIcon(mapping: { if?: TagsFilter }): BaseUIElement { function getAutoIcon(mapping: { readonly if?: TagsFilter }): Readonly<Record<string, string>> {
for (const preset of layer.presets) { for (const preset of layer.presets) {
if (!new And(preset.tags).shadows(mapping.if)) { if (!new And(preset.tags).shadows(mapping.if)) {
continue continue
} }
return layer.defaultIcon(TagUtils.asProperties(preset.tags)) return TagUtils.asProperties(preset.tags)
} }
return undefined return undefined
} }
@ -62,7 +64,7 @@
<div class="inline-flex items-center"> <div class="inline-flex items-center">
{#if mapping.icon === "auto"} {#if mapping.icon === "auto"}
<div class="mr-2 h-8 w-8 shrink-0"> <div class="mr-2 h-8 w-8 shrink-0">
<ToSvelte construct={() => getAutoIcon(mapping)} /> <DefaultIcon {layer} properties={getAutoIcon(mapping)}/>
</div> </div>
{:else} {:else}
<Marker <Marker

View file

@ -33,7 +33,6 @@
import Markdown from "../../Base/Markdown.svelte" import Markdown from "../../Base/Markdown.svelte"
import { Utils } from "../../../Utils" import { Utils } from "../../../Utils"
import type { UploadableTag } from "../../../Logic/Tags/TagTypes" import type { UploadableTag } from "../../../Logic/Tags/TagTypes"
import { Modal } from "flowbite-svelte"
import Popup from "../../Base/Popup.svelte" import Popup from "../../Base/Popup.svelte"
import If from "../../Base/If.svelte" import If from "../../Base/If.svelte"
import DotMenu from "../../Base/DotMenu.svelte" import DotMenu from "../../Base/DotMenu.svelte"
@ -341,7 +340,7 @@
.catch(console.error) .catch(console.error)
} }
let disabledInTheme = state.userRelatedState.getThemeDisabled(state.theme.id, layer?.id) let disabledInTheme = state.userRelatedState?.getThemeDisabled(state.theme.id, layer?.id) ?? new UIEventSource<string[]>([])
let menuIsOpened = new UIEventSource(false) let menuIsOpened = new UIEventSource(false)
function disableQuestion() { function disableQuestion() {
@ -361,7 +360,7 @@
{#if question !== undefined && $apiState !== "readonly" && $apiState !== "offline"} {#if question !== undefined && $apiState !== "readonly" && $apiState !== "offline"}
<div class={clss}> <div class={clss}>
{#if layer.isNormal()} {#if layer?.isNormal()}
<LoginToggle {state}> <LoginToggle {state}>
<DotMenu hideBackground={true} open={menuIsOpened}> <DotMenu hideBackground={true} open={menuIsOpened}>
<SidebarUnit> <SidebarUnit>
@ -559,7 +558,7 @@
</h2> </h2>
<Tr t={Translations.t.unknown.explanation} /> <Tr t={Translations.t.unknown.explanation} />
<If <If
condition={state.userRelatedState.showTags.map( condition={state.userRelatedState?.showTags?.map(
(v) => v === "yes" || v === "full" || v === "always" (v) => v === "yes" || v === "full" || v === "always"
)} )}
> >

View file

@ -18,6 +18,7 @@
import { twJoin } from "tailwind-merge" import { twJoin } from "tailwind-merge"
import Tr from "../../Base/Tr.svelte" import Tr from "../../Base/Tr.svelte"
import { TrashIcon } from "@rgossiaux/svelte-heroicons/solid" import { TrashIcon } from "@rgossiaux/svelte-heroicons/solid"
import Loading from "../../Base/Loading.svelte"
export let config: TagRenderingConfig export let config: TagRenderingConfig
export let tags: UIEventSource<Record<string, string>> export let tags: UIEventSource<Record<string, string>>
@ -31,14 +32,18 @@
let dynamicConfig = TagRenderingConfigUtils.withNameSuggestionIndex(config, tags, selectedElement) let dynamicConfig = TagRenderingConfigUtils.withNameSuggestionIndex(config, tags, selectedElement)
</script> </script>
<TagRenderingQuestion {#if $dynamicConfig }
{tags} <TagRenderingQuestion
config={$dynamicConfig} {tags}
{state} config={$dynamicConfig}
{selectedElement} {state}
{layer} {selectedElement}
{selectedTags} {layer}
{extraTags} {selectedTags}
> {extraTags}
<slot name="cancel" slot="cancel" /> >
</TagRenderingQuestion> <slot name="cancel" slot="cancel" />
</TagRenderingQuestion>
{:else}
<Loading />
{/if}

View file

@ -14,6 +14,7 @@
import FilterSearch from "../../Logic/Search/FilterSearch" import FilterSearch from "../../Logic/Search/FilterSearch"
import Locale from "../i18n/Locale" import Locale from "../i18n/Locale"
import DefaultIcon from "../Map/DefaultIcon.svelte"
export let activeFilters: (FilterSearchResult & ActiveFilter)[] export let activeFilters: (FilterSearchResult & ActiveFilter)[]
let language = Locale.language let language = Locale.language
@ -72,7 +73,7 @@
{#if $activeLayers.length === 1} {#if $activeLayers.length === 1}
<FilterToggle on:click={() => enableAllLayers()}> <FilterToggle on:click={() => enableAllLayers()}>
<div class="h-8 w-8 p-1"> <div class="h-8 w-8 p-1">
<ToSvelte construct={$activeLayers[0].layerDef.defaultIcon()} /> <DefaultIcon layer={$activeLayers[0].layerDef}/>
</div> </div>
<b> <b>
<Tr t={$activeLayers[0].layerDef.name} /> <Tr t={$activeLayers[0].layerDef.name} />
@ -82,7 +83,7 @@
{#each $nonactiveLayers as nonActive (nonActive.layerDef.id)} {#each $nonactiveLayers as nonActive (nonActive.layerDef.id)}
<FilterToggle on:click={() => nonActive.isDisplayed.set(true)}> <FilterToggle on:click={() => nonActive.isDisplayed.set(true)}>
<div class="h-8 w-8 p-1"> <div class="h-8 w-8 p-1">
<ToSvelte construct={nonActive.layerDef.defaultIcon()} /> <DefaultIcon layer={nonActive.layerDef}/>
</div> </div>
<del class="block-ruby"> <del class="block-ruby">
<Tr t={nonActive.layerDef.name} /> <Tr t={nonActive.layerDef.name} />

View file

@ -6,6 +6,7 @@
import type { FilterSearchResult } from "../../Logic/Search/FilterSearch" import type { FilterSearchResult } from "../../Logic/Search/FilterSearch"
import LayerConfig from "../../Models/ThemeConfig/LayerConfig" import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
import Loading from "../Base/Loading.svelte" import Loading from "../Base/Loading.svelte"
import DefaultIcon from "../Map/DefaultIcon.svelte"
export let entry: FilterSearchResult[] | LayerConfig export let entry: FilterSearchResult[] | LayerConfig
let asFilter: FilterSearchResult[] let asFilter: FilterSearchResult[]
@ -41,7 +42,7 @@
<div class="flex items-center gap-x-1"> <div class="flex items-center gap-x-1">
{#if asLayer} {#if asLayer}
<div class="h-8 w-8 p-1"> <div class="h-8 w-8 p-1">
<ToSvelte construct={asLayer.defaultIcon()} /> <DefaultIcon layer={asLayer}/>
</div> </div>
<b> <b>
<Tr t={asLayer.name} /> <Tr t={asLayer.name} />

View file

@ -12,6 +12,7 @@
import Icon from "../Map/Icon.svelte" import Icon from "../Map/Icon.svelte"
import TagRenderingAnswer from "../Popup/TagRendering/TagRenderingAnswer.svelte" import TagRenderingAnswer from "../Popup/TagRendering/TagRenderingAnswer.svelte"
import ArrowUp from "@babeard/svelte-heroicons/mini/ArrowUp" import ArrowUp from "@babeard/svelte-heroicons/mini/ArrowUp"
import DefaultIcon from "../Map/DefaultIcon.svelte"
export let entry: GeocodeResult export let entry: GeocodeResult
export let state: SpecialVisualizationState export let state: SpecialVisualizationState
@ -62,9 +63,7 @@
<div class="flex w-full items-center gap-y-2 p-2"> <div class="flex w-full items-center gap-y-2 p-2">
{#if layer} {#if layer}
<div class="h-6"> <div class="h-6">
<ToSvelte <DefaultIcon {layer} properties={entry.feature.properties} clss="w-6 h-6"/>
construct={() => layer.defaultIcon(entry.feature.properties)?.SetClass("w-6 h-6")}
/>
</div> </div>
{:else if entry.category} {:else if entry.category}
<Icon <Icon

View file

@ -125,7 +125,7 @@ class NearbyImageVis implements SpecialVisualization {
tags: UIEventSource<Record<string, string>>, tags: UIEventSource<Record<string, string>>,
args: string[], args: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): SvelteUIElement { ): SvelteUIElement {
const isOpen = args[0] === "open" const isOpen = args[0] === "open"
const readonly = args[1] === "readonly" || args[1] === "yes" const readonly = args[1] === "readonly" || args[1] === "yes"
@ -192,7 +192,7 @@ class StealViz implements SpecialVisualization {
selectedElement: otherFeature, selectedElement: otherFeature,
state, state,
layer, layer,
}) }),
) )
} }
if (elements.length === 1) { if (elements.length === 1) {
@ -200,8 +200,8 @@ class StealViz implements SpecialVisualization {
} }
return new Combine(elements).SetClass("flex flex-col") return new Combine(elements).SetClass("flex flex-col")
}, },
[state.indexedFeatures.featuresById] [state.indexedFeatures.featuresById],
) ),
) )
} }
@ -253,11 +253,11 @@ class CloseNoteViz implements SpecialVisualization {
public constr( public constr(
state: SpecialVisualizationState, state: SpecialVisualizationState,
tags: UIEventSource<Record<string, string>>, tags: UIEventSource<Record<string, string>>,
args: string[] args: string[],
): SvelteUIElement { ): SvelteUIElement {
const { text, icon, idkey, comment, minZoom, zoomButton } = Utils.ParseVisArgs( const { text, icon, idkey, comment, minZoom, zoomButton } = Utils.ParseVisArgs(
this.args, this.args,
args args,
) )
return new SvelteUIElement(CloseNoteButton, { return new SvelteUIElement(CloseNoteButton, {
@ -298,7 +298,7 @@ export class QuestionViz implements SpecialVisualization {
tags: UIEventSource<Record<string, string>>, tags: UIEventSource<Record<string, string>>,
args: string[], args: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): SvelteUIElement { ): SvelteUIElement {
const labels = args[0] const labels = args[0]
?.split(";") ?.split(";")
@ -315,7 +315,7 @@ export class QuestionViz implements SpecialVisualization {
state, state,
onlyForLabels: labels, onlyForLabels: labels,
notForLabels: blacklist, notForLabels: blacklist,
}).SetClass("w-full") })
} }
} }
@ -330,7 +330,7 @@ export default class SpecialVisualizations {
for (const specialVisualization of SpecialVisualizations.specialVisualizations) { for (const specialVisualization of SpecialVisualizations.specialVisualizations) {
SpecialVisualizations.specialVisualisationsDict.set( SpecialVisualizations.specialVisualisationsDict.set(
specialVisualization.funcName, specialVisualization.funcName,
specialVisualization specialVisualization,
) )
} }
} }
@ -350,15 +350,15 @@ export default class SpecialVisualizations {
viz.docs, viz.docs,
viz.args.length > 0 viz.args.length > 0
? MarkdownUtils.table( ? MarkdownUtils.table(
["name", "default", "description"], ["name", "default", "description"],
viz.args.map((arg) => { viz.args.map((arg) => {
let defaultArg = arg.defaultValue ?? "_undefined_" let defaultArg = arg.defaultValue ?? "_undefined_"
if (defaultArg == "") { if (defaultArg == "") {
defaultArg = "_empty string_" defaultArg = "_empty string_"
} }
return [arg.name, defaultArg, arg.doc] return [arg.name, defaultArg, arg.doc]
}) }),
) )
: undefined, : undefined,
"#### Example usage of " + viz.funcName, "#### Example usage of " + viz.funcName,
"<code>" + example + "</code>", "<code>" + example + "</code>",
@ -367,18 +367,18 @@ export default class SpecialVisualizations {
public static constructSpecification( public static constructSpecification(
template: string, template: string,
extraMappings: SpecialVisualization[] = [] extraMappings: SpecialVisualization[] = [],
): RenderingSpecification[] { ): RenderingSpecification[] {
return SpecialVisualisationUtils.constructSpecification( return SpecialVisualisationUtils.constructSpecification(
template, template,
SpecialVisualizations.specialVisualisationsDict, SpecialVisualizations.specialVisualisationsDict,
extraMappings extraMappings,
) )
} }
public static HelpMessage(): string { public static HelpMessage(): string {
const helpTexts: string[] = SpecialVisualizations.specialVisualizations.map((viz) => const helpTexts: string[] = SpecialVisualizations.specialVisualizations.map((viz) =>
SpecialVisualizations.DocumentationFor(viz) SpecialVisualizations.DocumentationFor(viz),
) )
const firstPart = new Combine([ const firstPart = new Combine([
@ -411,10 +411,10 @@ export default class SpecialVisualizations {
}, },
}, },
null, null,
" " " ",
) ),
).SetClass("code"), ).SetClass("code"),
'In other words: use `{ "before": ..., "after": ..., "special": {"type": ..., "argname": ...argvalue...}`. The args are in the `special` block; an argvalue can be a string, a translation or another value. (Refer to class `RewriteSpecial` in case of problems)', "In other words: use `{ \"before\": ..., \"after\": ..., \"special\": {\"type\": ..., \"argname\": ...argvalue...}`. The args are in the `special` block; an argvalue can be a string, a translation or another value. (Refer to class `RewriteSpecial` in case of problems)",
]) ])
.SetClass("flex flex-col") .SetClass("flex flex-col")
.AsMarkdown() .AsMarkdown()
@ -435,7 +435,7 @@ export default class SpecialVisualizations {
return new SvelteUIElement(AddNewPoint, { return new SvelteUIElement(AddNewPoint, {
state, state,
coordinate: { lon, lat }, coordinate: { lon, lat },
}).SetClass("w-full h-full overflow-auto") })
}, },
}, },
{ {
@ -452,10 +452,10 @@ export default class SpecialVisualizations {
assignTo: state.userRelatedState.language, assignTo: state.userRelatedState.language,
availableLanguages: languages, availableLanguages: languages,
preferredLanguages: state.osmConnection.userDetails.map( preferredLanguages: state.osmConnection.userDetails.map(
(ud) => ud.languages (ud) => ud.languages,
), ),
}) })
}) }),
) )
}, },
}, },
@ -494,7 +494,7 @@ export default class SpecialVisualizations {
state: SpecialVisualizationState, state: SpecialVisualizationState,
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
args: string[], args: string[],
feature: Feature feature: Feature,
): SvelteUIElement { ): SvelteUIElement {
return new SvelteUIElement(MinimapViz, { state, args, feature, tagSource }) return new SvelteUIElement(MinimapViz, { state, args, feature, tagSource })
}, },
@ -506,7 +506,7 @@ export default class SpecialVisualizations {
constr( constr(
state: SpecialVisualizationState, state: SpecialVisualizationState,
tagSource: UIEventSource<Record<string, string>> tagSource: UIEventSource<Record<string, string>>,
): BaseUIElement { ): BaseUIElement {
return new VariableUiElement( return new VariableUiElement(
tagSource tagSource
@ -516,7 +516,7 @@ export default class SpecialVisualizations {
return new SvelteUIElement(SplitRoadWizard, { id, state }) return new SvelteUIElement(SplitRoadWizard, { id, state })
} }
return undefined return undefined
}) }),
) )
}, },
}, },
@ -530,7 +530,7 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
if (feature.geometry.type !== "Point") { if (feature.geometry.type !== "Point") {
return undefined return undefined
@ -553,7 +553,7 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
if (!layer.deletion) { if (!layer.deletion) {
return undefined return undefined
@ -564,7 +564,7 @@ export default class SpecialVisualizations {
state, state,
feature, feature,
layer, layer,
}).SetClass("p-0 m-0") })
}, },
}, },
new ShareLinkViz(), new ShareLinkViz(),
@ -579,7 +579,7 @@ export default class SpecialVisualizations {
tags: UIEventSource<Record<string, string>>, tags: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
) { ) {
if (feature.geometry.type !== "LineString") { if (feature.geometry.type !== "LineString") {
return undefined return undefined
@ -611,7 +611,7 @@ export default class SpecialVisualizations {
state: SpecialVisualizationState, state: SpecialVisualizationState,
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature feature: Feature,
): BaseUIElement { ): BaseUIElement {
const [lon, lat] = GeoOperations.centerpointCoordinates(feature) const [lon, lat] = GeoOperations.centerpointCoordinates(feature)
return new SvelteUIElement(CreateNewNote, { return new SvelteUIElement(CreateNewNote, {
@ -674,7 +674,7 @@ export default class SpecialVisualizations {
.map((tags) => tags[args[0]]) .map((tags) => tags[args[0]])
.map((wikidata) => { .map((wikidata) => {
wikidata = Utils.NoEmpty( wikidata = Utils.NoEmpty(
wikidata?.split(";")?.map((wd) => wd.trim()) ?? [] wikidata?.split(";")?.map((wd) => wd.trim()) ?? [],
)[0] )[0]
const entry = Wikidata.LoadWikidataEntry(wikidata) const entry = Wikidata.LoadWikidataEntry(wikidata)
return new VariableUiElement( return new VariableUiElement(
@ -684,9 +684,9 @@ export default class SpecialVisualizations {
} }
const response = <WikidataResponse>e["success"] const response = <WikidataResponse>e["success"]
return Translation.fromMap(response.labels) return Translation.fromMap(response.labels)
}) }),
) )
}) }),
), ),
}, },
new MapillaryLinkVis(), new MapillaryLinkVis(),
@ -700,7 +700,7 @@ export default class SpecialVisualizations {
tags: UIEventSource<Record<string, string>>, tags: UIEventSource<Record<string, string>>,
_, _,
__, __,
layer: LayerConfig layer: LayerConfig,
) => new SvelteUIElement(AllTagsPanel, { tags, layer }), ) => new SvelteUIElement(AllTagsPanel, { tags, layer }),
}, },
{ {
@ -784,7 +784,7 @@ export default class SpecialVisualizations {
nameKey: nameKey, nameKey: nameKey,
fallbackName, fallbackName,
}, },
state.featureSwitchIsTesting state.featureSwitchIsTesting,
) )
return new SvelteUIElement(StarsBarIcon, { return new SvelteUIElement(StarsBarIcon, {
score: reviews.average, score: reviews.average,
@ -818,7 +818,7 @@ export default class SpecialVisualizations {
nameKey: nameKey, nameKey: nameKey,
fallbackName, fallbackName,
}, },
state.featureSwitchIsTesting state.featureSwitchIsTesting,
) )
return new SvelteUIElement(ReviewForm, { reviews, state, tags, feature, layer }) return new SvelteUIElement(ReviewForm, { reviews, state, tags, feature, layer })
}, },
@ -849,7 +849,7 @@ export default class SpecialVisualizations {
nameKey: nameKey, nameKey: nameKey,
fallbackName, fallbackName,
}, },
state.featureSwitchIsTesting state.featureSwitchIsTesting,
) )
return new SvelteUIElement(AllReviews, { reviews, state, tags, feature, layer }) return new SvelteUIElement(AllReviews, { reviews, state, tags, feature, layer })
}, },
@ -875,7 +875,7 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
args: string[], args: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
return new Combine([ return new Combine([
SpecialVisualizations.specialVisualisationsDict["create_review"].constr( SpecialVisualizations.specialVisualisationsDict["create_review"].constr(
@ -883,14 +883,14 @@ export default class SpecialVisualizations {
tagSource, tagSource,
args, args,
feature, feature,
layer layer,
), ),
SpecialVisualizations.specialVisualisationsDict["list_reviews"].constr( SpecialVisualizations.specialVisualisationsDict["list_reviews"].constr(
state, state,
tagSource, tagSource,
args, args,
feature, feature,
layer layer,
), ),
]) ])
}, },
@ -908,7 +908,7 @@ export default class SpecialVisualizations {
constr( constr(
state: SpecialVisualizationState, state: SpecialVisualizationState,
_: UIEventSource<Record<string, string>>, _: UIEventSource<Record<string, string>>,
argument: string[] argument: string[],
): BaseUIElement { ): BaseUIElement {
const [text] = argument const [text] = argument
return new SvelteUIElement(ImportReviewIdentity, { state, text }) return new SvelteUIElement(ImportReviewIdentity, { state, text })
@ -965,7 +965,7 @@ export default class SpecialVisualizations {
constr( constr(
state: SpecialVisualizationState, state: SpecialVisualizationState,
tags: UIEventSource<Record<string, string>>, tags: UIEventSource<Record<string, string>>,
args: string[] args: string[],
): SvelteUIElement { ): SvelteUIElement {
const keyToUse = args[0] const keyToUse = args[0]
const prefix = args[1] const prefix = args[1]
@ -1002,17 +1002,17 @@ export default class SpecialVisualizations {
return undefined return undefined
} }
const allUnits: Unit[] = [].concat( const allUnits: Unit[] = [].concat(
...(state?.theme?.layers?.map((lyr) => lyr.units) ?? []) ...(state?.theme?.layers?.map((lyr) => lyr.units) ?? []),
) )
const unit = allUnits.filter((unit) => const unit = allUnits.filter((unit) =>
unit.isApplicableToKey(key) unit.isApplicableToKey(key),
)[0] )[0]
if (unit === undefined) { if (unit === undefined) {
return value return value
} }
const getCountry = () => tagSource.data._country const getCountry = () => tagSource.data._country
return unit.asHumanLongValue(value, getCountry) return unit.asHumanLongValue(value, getCountry)
}) }),
) )
}, },
}, },
@ -1065,8 +1065,8 @@ export default class SpecialVisualizations {
constr: (state) => { constr: (state) => {
return new SubtleButton( return new SubtleButton(
new SvelteUIElement(Trash).SetClass("h-6"), new SvelteUIElement(Trash),
Translations.t.general.removeLocationHistory Translations.t.general.removeLocationHistory,
).onClick(() => { ).onClick(() => {
state.historicalUserLocations.features.setData([]) state.historicalUserLocations.features.setData([])
state.selectedElement.setData(undefined) state.selectedElement.setData(undefined)
@ -1107,10 +1107,10 @@ export default class SpecialVisualizations {
new SvelteUIElement(NoteCommentElement, { new SvelteUIElement(NoteCommentElement, {
comment, comment,
state, state,
}) }),
) ),
).SetClass("flex flex-col") ).SetClass("flex flex-col")
}) }),
), ),
}, },
{ {
@ -1143,7 +1143,7 @@ export default class SpecialVisualizations {
tagsSource: UIEventSource<Record<string, string>>, tagsSource: UIEventSource<Record<string, string>>,
_: string[], _: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
) => ) =>
new VariableUiElement( new VariableUiElement(
tagsSource.map((tags) => { tagsSource.map((tags) => {
@ -1161,9 +1161,7 @@ export default class SpecialVisualizations {
feature, feature,
layer, layer,
}) })
.SetClass("px-1") }),
.setSpan()
})
), ),
}, },
{ {
@ -1179,8 +1177,8 @@ export default class SpecialVisualizations {
const challenge = Stores.FromPromise( const challenge = Stores.FromPromise(
Utils.downloadJsonCached<MaprouletteTask>( Utils.downloadJsonCached<MaprouletteTask>(
`${Maproulette.defaultEndpoint}/challenge/${parentId}`, `${Maproulette.defaultEndpoint}/challenge/${parentId}`,
24 * 60 * 60 * 1000 24 * 60 * 60 * 1000,
) ),
) )
return new VariableUiElement( return new VariableUiElement(
@ -1205,7 +1203,7 @@ export default class SpecialVisualizations {
} else { } else {
return [title, new List(listItems)] return [title, new List(listItems)]
} }
}) }),
) )
}, },
docs: "Fetches the metadata of MapRoulette campaign that this task is part of and shows those details (namely `title`, `description` and `instruction`).\n\nThis reads the property `mr_challengeId` to detect the parent campaign.", docs: "Fetches the metadata of MapRoulette campaign that this task is part of and shows those details (namely `title`, `description` and `instruction`).\n\nThis reads the property `mr_challengeId` to detect the parent campaign.",
@ -1219,15 +1217,15 @@ export default class SpecialVisualizations {
"\n" + "\n" +
"```json\n" + "```json\n" +
"{\n" + "{\n" +
' "id": "mark_duplicate",\n' + " \"id\": \"mark_duplicate\",\n" +
' "render": {\n' + " \"render\": {\n" +
' "special": {\n' + " \"special\": {\n" +
' "type": "maproulette_set_status",\n' + " \"type\": \"maproulette_set_status\",\n" +
' "message": {\n' + " \"message\": {\n" +
' "en": "Mark as not found or false positive"\n' + " \"en\": \"Mark as not found or false positive\"\n" +
" },\n" + " },\n" +
' "status": "2",\n' + " \"status\": \"2\",\n" +
' "image": "close"\n' + " \"image\": \"close\"\n" +
" }\n" + " }\n" +
" }\n" + " }\n" +
"}\n" + "}\n" +
@ -1303,7 +1301,7 @@ export default class SpecialVisualizations {
(l) => (l) =>
l.name !== null && l.name !== null &&
l.title && l.title &&
state.perLayer.get(l.id) !== undefined state.perLayer.get(l.id) !== undefined,
) )
.map( .map(
(l) => { (l) => {
@ -1313,8 +1311,8 @@ export default class SpecialVisualizations {
const fsBboxed = new BBoxFeatureSourceForLayer(fs, bbox) const fsBboxed = new BBoxFeatureSourceForLayer(fs, bbox)
return new StatisticsPanel(fsBboxed) return new StatisticsPanel(fsBboxed)
}, },
[state.mapProperties.bounds] [state.mapProperties.bounds],
) ),
) )
}, },
}, },
@ -1384,7 +1382,7 @@ export default class SpecialVisualizations {
constr( constr(
state: SpecialVisualizationState, state: SpecialVisualizationState,
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
args: string[] args: string[],
): SvelteUIElement { ): SvelteUIElement {
let [text, href, classnames, download, ariaLabel, icon] = args let [text, href, classnames, download, ariaLabel, icon] = args
if (download === "") { if (download === "") {
@ -1422,7 +1420,7 @@ export default class SpecialVisualizations {
}, },
}, },
null, null,
" " " ",
) + ) +
"\n```", "\n```",
args: [ args: [
@ -1446,7 +1444,7 @@ export default class SpecialVisualizations {
featureTags: UIEventSource<Record<string, string>>, featureTags: UIEventSource<Record<string, string>>,
args: string[], args: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
) { ) {
const [key, tr, classesRaw] = args const [key, tr, classesRaw] = args
let classes = classesRaw ?? "" let classes = classesRaw ?? ""
@ -1464,7 +1462,7 @@ export default class SpecialVisualizations {
"Could not create a special visualization for multi(", "Could not create a special visualization for multi(",
args.join(", ") + ")", args.join(", ") + ")",
"no properties found for object", "no properties found for object",
feature.properties.id feature.properties.id,
) )
return undefined return undefined
} }
@ -1476,11 +1474,12 @@ export default class SpecialVisualizations {
state, state,
feature, feature,
layer, layer,
}).SetClass(classes) // clss: classes ?? "",
}) .SetClass(classes)
elements.push(subsTr) elements.push(subsTr)
} }
return elements return elements
}) }),
) )
}, },
}, },
@ -1500,7 +1499,7 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
return new VariableUiElement( return new VariableUiElement(
tagSource.map((tags) => { tagSource.map((tags) => {
@ -1512,7 +1511,7 @@ export default class SpecialVisualizations {
console.error("Cannot create a translation for", v, "due to", e) console.error("Cannot create a translation for", v, "due to", e)
return JSON.stringify(v) return JSON.stringify(v)
} }
}) }),
) )
}, },
}, },
@ -1532,7 +1531,7 @@ export default class SpecialVisualizations {
tags: UIEventSource<Record<string, string>>, tags: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
const key = argument[0] const key = argument[0]
return new SvelteUIElement(FediverseLink, { key, tags, state }) return new SvelteUIElement(FediverseLink, { key, tags, state })
@ -1554,7 +1553,7 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
args: string[], args: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
return new FixedUiElement("{" + args[0] + "}") return new FixedUiElement("{" + args[0] + "}")
}, },
@ -1575,7 +1574,7 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
const key = argument[0] ?? "value" const key = argument[0] ?? "value"
return new VariableUiElement( return new VariableUiElement(
@ -1593,12 +1592,12 @@ export default class SpecialVisualizations {
} catch (e) { } catch (e) {
return new FixedUiElement( return new FixedUiElement(
"Could not parse this tag: " + "Could not parse this tag: " +
JSON.stringify(value) + JSON.stringify(value) +
" due to " + " due to " +
e e,
).SetClass("alert") ).SetClass("alert")
} }
}) }),
) )
}, },
}, },
@ -1619,7 +1618,7 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
const giggityUrl = argument[0] const giggityUrl = argument[0]
return new SvelteUIElement(Giggity, { tags: tagSource, state, giggityUrl }) return new SvelteUIElement(Giggity, { tags: tagSource, state, giggityUrl })
@ -1635,12 +1634,12 @@ export default class SpecialVisualizations {
_: UIEventSource<Record<string, string>>, _: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
const tags = (<ThemeViewState>( const tags = (<ThemeViewState>(
state state
)).geolocation.currentUserLocation.features.map( )).geolocation.currentUserLocation.features.map(
(features) => features[0]?.properties (features) => features[0]?.properties,
) )
return new Combine([ return new Combine([
new SvelteUIElement(OrientationDebugPanel, {}), new SvelteUIElement(OrientationDebugPanel, {}),
@ -1662,7 +1661,7 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
return new SvelteUIElement(MarkAsFavourite, { return new SvelteUIElement(MarkAsFavourite, {
tags: tagSource, tags: tagSource,
@ -1682,14 +1681,14 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
return new SvelteUIElement(MarkAsFavouriteMini, { return new SvelteUIElement(MarkAsFavouriteMini, {
tags: tagSource, tags: tagSource,
state, state,
layer, layer,
feature, feature,
}).SetClass("w-full h-full") })
}, },
}, },
{ {
@ -1702,7 +1701,7 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
return new SvelteUIElement(DirectionIndicator, { state, feature }) return new SvelteUIElement(DirectionIndicator, { state, feature })
}, },
@ -1715,7 +1714,7 @@ export default class SpecialVisualizations {
state: SpecialVisualizationState, state: SpecialVisualizationState,
tags: UIEventSource<Record<string, string>>, tags: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature feature: Feature,
): SvelteUIElement { ): SvelteUIElement {
return new SvelteUIElement(QrCode, { state, tags, feature }) return new SvelteUIElement(QrCode, { state, tags, feature })
}, },
@ -1734,7 +1733,7 @@ export default class SpecialVisualizations {
constr( constr(
state: SpecialVisualizationState, state: SpecialVisualizationState,
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
args: string[] args: string[],
): BaseUIElement { ): BaseUIElement {
const key = args[0] === "" ? "_direction:centerpoint" : args[0] const key = args[0] === "" ? "_direction:centerpoint" : args[0]
return new VariableUiElement( return new VariableUiElement(
@ -1745,11 +1744,11 @@ export default class SpecialVisualizations {
}) })
.mapD((value) => { .mapD((value) => {
const dir = GeoOperations.bearingToHuman( const dir = GeoOperations.bearingToHuman(
GeoOperations.parseBearing(value) GeoOperations.parseBearing(value),
) )
console.log("Human dir", dir) console.log("Human dir", dir)
return Translations.t.general.visualFeedback.directionsAbsolute[dir] return Translations.t.general.visualFeedback.directionsAbsolute[dir]
}) }),
) )
}, },
}, },
@ -1779,7 +1778,7 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
args: string[], args: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
const url = args[0] const url = args[0]
const readonly = args[3] === "yes" const readonly = args[3] === "yes"
@ -1805,12 +1804,12 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
args: string[], args: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
return new Toggle( return new Toggle(
undefined, undefined,
new SvelteUIElement(LoginButton, { osmConnection: state.osmConnection }), new SvelteUIElement(LoginButton, { osmConnection: state.osmConnection }),
state.osmConnection.isLoggedIn state.osmConnection.isLoggedIn,
) )
}, },
}, },
@ -1848,7 +1847,7 @@ export default class SpecialVisualizations {
tags: UIEventSource<Record<string, string>>, tags: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
const key = argument[0] ?? "website" const key = argument[0] ?? "website"
const useProxy = argument[1] !== "no" const useProxy = argument[1] !== "no"
@ -1856,7 +1855,7 @@ export default class SpecialVisualizations {
const isClosed = (argument[4] ?? "yes") === "yes" const isClosed = (argument[4] ?? "yes") === "yes"
const countryStore: Store<string | undefined> = tags.mapD( const countryStore: Store<string | undefined> = tags.mapD(
(tags) => tags._country (tags) => tags._country,
) )
const sourceUrl: Store<string | undefined> = tags.mapD((tags) => { const sourceUrl: Store<string | undefined> = tags.mapD((tags) => {
if (!tags[key] || tags[key] === "undefined") { if (!tags[key] || tags[key] === "undefined") {
@ -1878,24 +1877,24 @@ export default class SpecialVisualizations {
const features = const features =
await LinkedDataLoader.fetchVeloparkEntry( await LinkedDataLoader.fetchVeloparkEntry(
url, url,
loadAll loadAll,
) )
const feature = const feature =
features.find( features.find(
(f) => f.properties["ref:velopark"] === url (f) => f.properties["ref:velopark"] === url,
) ?? features[0] ) ?? features[0]
const properties = feature.properties const properties = feature.properties
properties["ref:velopark"] = url properties["ref:velopark"] = url
console.log( console.log(
"Got properties from velopark:", "Got properties from velopark:",
properties properties,
) )
return properties return properties
} catch (e) { } catch (e) {
console.error(e) console.error(e)
throw e throw e
} }
})() })(),
) )
} }
if (country === undefined) { if (country === undefined) {
@ -1907,29 +1906,29 @@ export default class SpecialVisualizations {
return await LinkedDataLoader.fetchJsonLd( return await LinkedDataLoader.fetchJsonLd(
url, url,
{ country }, { country },
useProxy ? "proxy" : "fetch-lod" useProxy ? "proxy" : "fetch-lod",
) )
} catch (e) { } catch (e) {
console.log( console.log(
"Could not get with proxy/download LOD, attempting to download directly. Error for ", "Could not get with proxy/download LOD, attempting to download directly. Error for ",
url, url,
"is", "is",
e e,
) )
return await LinkedDataLoader.fetchJsonLd( return await LinkedDataLoader.fetchJsonLd(
url, url,
{ country }, { country },
"fetch-raw" "fetch-raw",
) )
} }
})() })(),
) )
}, },
[countryStore] [countryStore],
) )
externalData.addCallbackAndRunD((lod) => externalData.addCallbackAndRunD((lod) =>
console.log("linked_data_from_website received the following data:", lod) console.log("linked_data_from_website received the following data:", lod),
) )
return new Toggle( return new Toggle(
@ -1944,7 +1943,7 @@ export default class SpecialVisualizations {
collapsed: isClosed, collapsed: isClosed,
}), }),
undefined, undefined,
sourceUrl.map((url) => !!url) sourceUrl.map((url) => !!url),
) )
}, },
}, },
@ -1964,7 +1963,7 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
const text = argument[0] const text = argument[0]
const cssClasses = argument[1] const cssClasses = argument[1]
@ -1986,7 +1985,7 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
const translation = tagSource.map((tags) => { const translation = tagSource.map((tags) => {
const layer = state.theme.getMatchingLayer(tags) const layer = state.theme.getMatchingLayer(tags)
@ -2018,7 +2017,7 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): SvelteUIElement { ): SvelteUIElement {
return new SvelteUIElement<any, any, any>(ClearCaches, { return new SvelteUIElement<any, any, any>(ClearCaches, {
msg: argument[0] ?? "Clear local caches", msg: argument[0] ?? "Clear local caches",
@ -2043,7 +2042,7 @@ export default class SpecialVisualizations {
tags: UIEventSource<Record<string, string>>, tags: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
selectedElement: Feature, selectedElement: Feature,
layer: LayerConfig layer: LayerConfig,
): SvelteUIElement { ): SvelteUIElement {
const [header, labelsStr] = argument const [header, labelsStr] = argument
const labels = labelsStr.split(";").map((x) => x.trim()) const labels = labelsStr.split(";").map((x) => x.trim())
@ -2066,7 +2065,7 @@ export default class SpecialVisualizations {
tags: UIEventSource<Record<string, string>>, tags: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
selectedElement: Feature, selectedElement: Feature,
layer: LayerConfig layer: LayerConfig,
): SvelteUIElement { ): SvelteUIElement {
const t = Translations.t.preset_type const t = Translations.t.preset_type
const question: QuestionableTagRenderingConfigJson = { const question: QuestionableTagRenderingConfigJson = {
@ -2106,7 +2105,7 @@ export default class SpecialVisualizations {
tagSource: UIEventSource<Record<string, string>>, tagSource: UIEventSource<Record<string, string>>,
argument: string[], argument: string[],
feature: Feature, feature: Feature,
layer: LayerConfig layer: LayerConfig,
): BaseUIElement { ): BaseUIElement {
const text = argument[0] const text = argument[0]
return new SubtleButton(undefined, text).onClick(() => { return new SubtleButton(undefined, text).onClick(() => {
@ -2137,7 +2136,7 @@ export default class SpecialVisualizations {
"Invalid special visualisation found: funcName is undefined or doesn't match " + "Invalid special visualisation found: funcName is undefined or doesn't match " +
regex + regex +
invalid.map((sp) => sp.i).join(", ") + invalid.map((sp) => sp.i).join(", ") +
'. Did you perhaps type \n funcName: "funcname" // type declaration uses COLON\ninstead of:\n funcName = "funcName" // value definition uses EQUAL' ". Did you perhaps type \n funcName: \"funcname\" // type declaration uses COLON\ninstead of:\n funcName = \"funcName\" // value definition uses EQUAL"
) )
} }

View file

@ -47,6 +47,7 @@
import ChevronRight from "@babeard/svelte-heroicons/mini/ChevronRight" import ChevronRight from "@babeard/svelte-heroicons/mini/ChevronRight"
import { Drawer } from "flowbite-svelte" import { Drawer } from "flowbite-svelte"
import { linear } from "svelte/easing" import { linear } from "svelte/easing"
import DefaultIcon from "./Map/DefaultIcon.svelte"
export let state: ThemeViewState export let state: ThemeViewState
@ -395,7 +396,7 @@
<div class="float-left m-1 flex flex-col sm:mt-2"> <div class="float-left m-1 flex flex-col sm:mt-2">
<!-- Current view tools --> <!-- Current view tools -->
{#if currentViewLayer?.tagRenderings && currentViewLayer.defaultIcon()} {#if currentViewLayer?.tagRenderings && currentViewLayer.hasDefaultIcon()}
<MapControlButton <MapControlButton
on:click={() => { on:click={() => {
state.selectCurrentView() state.selectCurrentView()
@ -403,7 +404,7 @@
on:keydown={forwardEventToMap} on:keydown={forwardEventToMap}
> >
<div class="h-8 w-8 cursor-pointer"> <div class="h-8 w-8 cursor-pointer">
<ToSvelte construct={() => currentViewLayer.defaultIcon()} /> <DefaultIcon layer={currentViewLayer}/>
</div> </div>
</MapControlButton> </MapControlButton>
{/if} {/if}

View file

@ -1,7 +1,7 @@
{ {
"contributors": [ "contributors": [
{ {
"commits": 8792, "commits": 8786,
"contributor": "Pieter Vander Vennet" "contributor": "Pieter Vander Vennet"
}, },
{ {

View file

@ -1,131 +0,0 @@
[
{
"name": "CyclOSM",
"id": "cyclosm",
"url": "https://{switch:a,b,c}.tile-cyclosm.openstreetmap.fr/cyclosm/{zoom}/{x}/{y}.png",
"attribution": {
"text": "Rendering: CyclOSM (hosted by OpenStreetMap France) © Map data OpenStreetMap contributors",
"url": "https://www.cyclosm.org/"
},
"type": "tms",
"category": "osmbasedmap",
"max_zoom": 20
},
{
"name": "Esri World Imagery",
"id": "EsriWorldImagery",
"url": "https://{switch:services,server}.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{zoom}/{y}/{x}",
"attribution": {
"required": true,
"text": "Terms & Feedback",
"url": "https://wiki.openstreetmap.org/wiki/Esri"
},
"type": "tms",
"category": "photo",
"max_zoom": 22,
"default": true
},
{
"name": "Esri World Imagery (Clarity) Beta",
"id": "EsriWorldImageryClarity",
"url": "https://clarity.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/MapServer/tile/{zoom}/{y}/{x}",
"attribution": {
"required": true,
"text": "Terms & Feedback",
"url": "https://wiki.openstreetmap.org/wiki/Esri"
},
"type": "tms",
"category": "photo",
"max_zoom": 22,
"default": true
},
{
"name": "Mapbox Satellite",
"id": "Mapbox",
"url": "https://{switch:a,b,c,d}.tiles.mapbox.com/v4/mapbox.satellite/{zoom}/{x}/{y}.jpg?access_token=pk.eyJ1Ijoib3BlbnN0cmVldG1hcCIsImEiOiJjbGZkempiNDkyandvM3lwY3M4MndpdWdzIn0.QnvRv52n3qffVEKmQa9vJA",
"attribution": {
"required": true,
"text": "Terms & Feedback",
"url": "https://www.mapbox.com/about/maps"
},
"type": "tms",
"category": "photo",
"max_zoom": 22,
"default": true
},
{
"name": "OpenAerialMap Mosaic, by Kontur.io",
"id": "OpenAerialMapMosaic",
"url": "https://apps.kontur.io/raster-tiler/oam/mosaic/{zoom}/{x}/{y}.png",
"type": "tms",
"category": "photo",
"min_zoom": 1,
"max_zoom": 31,
"default": true
},
{
"name": "OpenStreetMap (Basque Style)",
"id": "osmfr-basque",
"url": "https://tile.openstreetmap.bzh/eu/{zoom}/{x}/{y}.png",
"attribution": {
"required": true,
"text": "Tiles © OpenStreetMap France, data © OpenStreetMap contributors, ODbL",
"url": "https://www.openstreetmap.org/"
},
"type": "tms",
"category": "osmbasedmap",
"max_zoom": 20
},
{
"name": "OpenStreetMap (Breton Style)",
"id": "osmfr-breton",
"url": "https://tile.openstreetmap.bzh/br/{zoom}/{x}/{y}.png",
"attribution": {
"required": true,
"text": "Tiles © OpenStreetMap France, data © OpenStreetMap contributors, ODbL",
"url": "https://www.openstreetmap.org/"
},
"type": "tms",
"category": "osmbasedmap",
"max_zoom": 20
},
{
"name": "OpenStreetMap (French Style)",
"id": "osmfr",
"url": "https://{switch:a,b,c}.tile.openstreetmap.fr/osmfr/{zoom}/{x}/{y}.png",
"attribution": {
"required": true,
"text": "Tiles © cquest@Openstreetmap France, data © OpenStreetMap contributors, ODBL",
"url": "https://www.openstreetmap.org/"
},
"type": "tms",
"category": "osmbasedmap",
"max_zoom": 20
},
{
"name": "OpenStreetMap (HOT Style)",
"id": "HDM_HOT",
"url": "https://{switch:a,b,c}.tile.openstreetmap.fr/hot/{zoom}/{x}/{y}.png",
"attribution": {
"required": true,
"text": "© OpenStreetMap contributors, tiles courtesy of Humanitarian OpenStreetMap Team",
"url": "https://www.hotosm.org/"
},
"type": "tms",
"category": "osmbasedmap",
"max_zoom": 20
},
{
"name": "OpenStreetMap (Occitan Style)",
"id": "osmfr-occitan",
"url": "https://tile.openstreetmap.bzh/oc/{zoom}/{x}/{y}.png",
"attribution": {
"required": true,
"text": "Tiles © OpenStreetMap France, data © OpenStreetMap contributors, ODbL",
"url": "https://www.openstreetmap.org/"
},
"type": "tms",
"category": "osmbasedmap",
"max_zoom": 20
}
]

File diff suppressed because one or more lines are too long

View file

@ -741,4 +741,4 @@
"contributor": "Carlos Ramos Carreño" "contributor": "Carlos Ramos Carreño"
} }
] ]
} }