Include 'lighthouses' as official theme
This commit is contained in:
parent
ee0a160b83
commit
28111b8e9a
6 changed files with 263 additions and 0 deletions
75
assets/layers/lighthouse/lighthouse.json
Normal file
75
assets/layers/lighthouse/lighthouse.json
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
{
|
||||||
|
"id": "lighthouse",
|
||||||
|
"name": {
|
||||||
|
"en": "lighthouse"
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"osmTags": "man_made=lighthouse"
|
||||||
|
},
|
||||||
|
"minzoom": 5,
|
||||||
|
"title": {
|
||||||
|
"render": {
|
||||||
|
"en": "lighthouse"
|
||||||
|
},
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"if": "name~*",
|
||||||
|
"then": {
|
||||||
|
"en": "{name}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"tagRenderings": [
|
||||||
|
"images",
|
||||||
|
"wikipedia",
|
||||||
|
{
|
||||||
|
"render": {
|
||||||
|
"en": "The height of this lighthouse is {height} metres."
|
||||||
|
},
|
||||||
|
"question": {
|
||||||
|
"en": "What is the height of this lighthouse, in metres?"
|
||||||
|
},
|
||||||
|
"freeform": {
|
||||||
|
"key": "height",
|
||||||
|
"type": "pfloat"
|
||||||
|
},
|
||||||
|
"id": "lighthouse-height"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"presets": [
|
||||||
|
{
|
||||||
|
"tags": [
|
||||||
|
"man_made=lighthouse"
|
||||||
|
],
|
||||||
|
"title": {
|
||||||
|
"en": "a lighthouse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pointRendering": [
|
||||||
|
{
|
||||||
|
"location": [
|
||||||
|
"point",
|
||||||
|
"centroid"
|
||||||
|
],
|
||||||
|
"marker": [
|
||||||
|
{
|
||||||
|
"icon": "./assets/themes/lighthouses/lighthouse.svg"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"anchor": "bottom"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"lineRendering": [],
|
||||||
|
"units": [
|
||||||
|
{
|
||||||
|
"height": {
|
||||||
|
"quantity": "distance",
|
||||||
|
"denominations": [
|
||||||
|
"m"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
12
assets/themes/lighthouses/license_info.json
Normal file
12
assets/themes/lighthouses/license_info.json
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"path": "lighthouse.svg",
|
||||||
|
"license": "CC0-1.0",
|
||||||
|
"authors": [
|
||||||
|
"Staszek Szybki Jest"
|
||||||
|
],
|
||||||
|
"sources": [
|
||||||
|
"https://commons.wikimedia.org/wiki/File:Lighthouse_icon_red.svg"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
153
assets/themes/lighthouses/lighthouse.svg
Normal file
153
assets/themes/lighthouses/lighthouse.svg
Normal file
|
@ -0,0 +1,153 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="500"
|
||||||
|
height="500"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||||
|
sodipodi:docname="Lighthouse_icon_red.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<metadata
|
||||||
|
id="metadata30">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<defs
|
||||||
|
id="defs28" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="995"
|
||||||
|
id="namedview26"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="0.51180724"
|
||||||
|
inkscape:cx="110.39312"
|
||||||
|
inkscape:cy="329.22551"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="g4"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1" />
|
||||||
|
<g
|
||||||
|
id="g4"
|
||||||
|
style="fill:#aa0000"
|
||||||
|
transform="translate(-1.3541311,-3.0540442)">
|
||||||
|
<path
|
||||||
|
d="M 510.40251,187.03576 295.39029,153.20722 296.11423,61.989918 510.40247,24.34468"
|
||||||
|
style="fill:none;stroke:#cb0000;stroke-width:4.06327;stroke-opacity:1"
|
||||||
|
id="path6"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccc" />
|
||||||
|
<path
|
||||||
|
d="M 1.705616,186.6782 216.71784,152.84967 215.9939,61.632358 1.7056566,23.987121"
|
||||||
|
style="fill:none;stroke:#cb0000;stroke-width:4.06327;stroke-opacity:1"
|
||||||
|
id="path8"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccc" />
|
||||||
|
<rect
|
||||||
|
width="444.33594"
|
||||||
|
height="29.805193"
|
||||||
|
x="33.733105"
|
||||||
|
y="467.62814"
|
||||||
|
style="fill:#cb0000;fill-opacity:1;stroke:none;stroke-width:4.06327"
|
||||||
|
id="rect10" />
|
||||||
|
<path
|
||||||
|
d="m 166.31722,473.14758 44.02407,-321.2337 h 90.09576 l 45.04788,320.12983 z"
|
||||||
|
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#cb0000;stroke-width:8.12654;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="path12" />
|
||||||
|
<rect
|
||||||
|
width="90.095413"
|
||||||
|
height="91.071419"
|
||||||
|
x="210.85336"
|
||||||
|
y="60.842449"
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#cb0000;stroke-width:8.12654;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect14" />
|
||||||
|
<path
|
||||||
|
d="M 179.11491,60.290509 332.68724,60.842459 256.41299,5.6476572 Z"
|
||||||
|
style="fill:#cb0000;fill-opacity:1;fill-rule:evenodd;stroke:#cb0000;stroke-width:4.21918px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
id="path16" />
|
||||||
|
<path
|
||||||
|
d="m 284.135,105.35065 a 28.23393,28.100607 0 1 1 -56.46786,0 28.23393,28.100607 0 1 1 56.46786,0 z"
|
||||||
|
style="fill:#cb0000;fill-opacity:1;stroke:none;stroke-width:4.21919;stroke-opacity:1"
|
||||||
|
id="path18" />
|
||||||
|
<path
|
||||||
|
d="m 178.07679,387.78392 h 155.64858 l 13.03104,87.4241 -181.71067,-0.7806 z"
|
||||||
|
style="fill:#cb0000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4.06327"
|
||||||
|
id="path20" />
|
||||||
|
<path
|
||||||
|
d="m 200.05888,222.60966 h 109.63677 l 12.76462,86.87215 -133.1184,-0.22864 z"
|
||||||
|
style="fill:#cb0000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4.06327"
|
||||||
|
id="path22" />
|
||||||
|
<rect
|
||||||
|
width="162.88805"
|
||||||
|
height="13.269717"
|
||||||
|
x="174.45705"
|
||||||
|
y="148.14821"
|
||||||
|
style="fill:#cb0000;fill-opacity:1;stroke:none;stroke-width:4.06327"
|
||||||
|
id="rect24" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#cb0000;stroke-width:4.06327px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="M 38.717366,102.20978 H 209.78021 m 88.36167,0 h 174.94289"
|
||||||
|
id="path3775"
|
||||||
|
inkscape:connector-type=""
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccc" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
inkscape:connector-type=""
|
||||||
|
id="path3816"
|
||||||
|
d="M 211.55897,83.612967 12.204712,60.405711"
|
||||||
|
style="fill:none;stroke:#cb0000;stroke-width:4.06327px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
inkscape:transform-center-y="-13.100338"
|
||||||
|
inkscape:transform-center-x="1.1861085" />
|
||||||
|
<path
|
||||||
|
inkscape:transform-center-x="1.1861085"
|
||||||
|
inkscape:transform-center-y="13.100337"
|
||||||
|
style="fill:none;stroke:#cb0000;stroke-width:4.06327px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="M 211.55897,121.35473 12.204712,144.56198"
|
||||||
|
id="path3818"
|
||||||
|
inkscape:connector-type=""
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
inkscape:transform-center-x="-1.1861121"
|
||||||
|
inkscape:transform-center-y="-13.100338"
|
||||||
|
style="fill:none;stroke:#cb0000;stroke-width:4.06327px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="M 296.63346,83.612967 495.98771,60.405711"
|
||||||
|
id="path3820"
|
||||||
|
inkscape:connector-type=""
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
inkscape:connector-type=""
|
||||||
|
id="path3822"
|
||||||
|
d="m 296.63346,121.35473 199.35425,23.20725"
|
||||||
|
style="fill:none;stroke:#cb0000;stroke-width:4.06327px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
inkscape:transform-center-y="13.100337"
|
||||||
|
inkscape:transform-center-x="-1.1861121" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.9 KiB |
2
assets/themes/lighthouses/lighthouse.svg.license
Normal file
2
assets/themes/lighthouses/lighthouse.svg.license
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
SPDX-FileCopyrightText: Staszek Szybki Jest
|
||||||
|
SPDX-License-Identifier: CC0-1.0
|
18
assets/themes/lighthouses/lighthouses.json
Normal file
18
assets/themes/lighthouses/lighthouses.json
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"id": "lighthouses",
|
||||||
|
"title": {
|
||||||
|
"en": "Lighthouses"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"en": "Lighthouses are tall buildings with a light on top to guide marine traffic."
|
||||||
|
},
|
||||||
|
"icon": "./assets/themes/lighthouses/lighthouse.svg",
|
||||||
|
"startZoom": 0,
|
||||||
|
"startLat": 51.33884,
|
||||||
|
"startLon": 3.14154,
|
||||||
|
"defaultBackgroundId": "protomaps.white",
|
||||||
|
"credits": "Seppe Santens",
|
||||||
|
"layers": [
|
||||||
|
"lighthouse"
|
||||||
|
]
|
||||||
|
}
|
|
@ -246,6 +246,9 @@ export class Unit {
|
||||||
return found
|
return found
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!Array.isArray(toLoad.denominations)){
|
||||||
|
throw "toLoad is not an array. Did you forget the [ and ] around the denominations at "+ctx+"?"
|
||||||
|
}
|
||||||
const denoms = toLoad.denominations
|
const denoms = toLoad.denominations
|
||||||
.map((d) => d.toLowerCase())
|
.map((d) => d.toLowerCase())
|
||||||
.map((d) => fetchDenom(d))
|
.map((d) => fetchDenom(d))
|
||||||
|
|
Loading…
Reference in a new issue