Various fixes

This commit is contained in:
Pieter Vander Vennet 2021-12-07 17:46:57 +01:00
parent 18044ff22b
commit 07fd8f404a
14 changed files with 154 additions and 60 deletions

View file

@ -0,0 +1,12 @@
[
{
"path": "townhall.svg",
"license": "CC0",
"authors": [
"Nebulon42"
],
"sources": [
"https://wiki.openstreetmap.org/wiki/File:Town-hall-16.svg"
]
}
]

View file

@ -13,7 +13,7 @@
"en"
],
"maintainer": "",
"icon": "./assets/svg/bug.svg",
"icon": "./assets/themes/postal_codes/townhall.svg",
"version": "0",
"startLat": 0,
"startLon": 0,
@ -21,13 +21,15 @@
"widenFactor": 0.05,
"socialImage": "",
"hideFromOverview": true,
"clustering": false,
"overpassTimeout": 180,
"layers": [
{
"id": "postal_codes",
"id": "postal_code_boundary",
"name": {
"en": "postal codes"
},
"minzoom": 12,
"minzoom": 8,
"title": {
"render": {
"en": "Postal code {postal_code}"
@ -42,11 +44,7 @@
}
}
],
"presets": [],
"source": {
"isOsmCache": true,
"geoJson": "http://127.0.0.1:8080/postal_codes_postal_codes_{z}_{x}_{y}.geojson",
"geoJsonZoomLevel": 1,
"osmTags": {
"or": [
"boundary=postal_code",
@ -61,12 +59,7 @@
},
"mapRendering": [
{
"icon": {
"render": "./assets/svg/bug.svg"
},
"iconSize": {
"render": "40,40,center"
},
"label": "<div class='text-xl bg-white rounded-full pl-2 pr-2 break-normal'>{postal_code}</div>",
"location": [
"point",
"centroid"
@ -77,8 +70,10 @@
"render": "#00f"
},
"width": {
"render": "8"
}
"render": "4"
},
"fill": "no",
"dashArray": "8 8"
}
],
"isShown": {
@ -90,34 +85,30 @@
}
},
{
"id": "town_halls",
"id": "town_hall",
"name": {
"en": "town halls"
},
"minzoom": 12,
"title": {
"render": {
"en": "Town halls"
"en": "Town hall {name}"
}
},
"calculatedTags": [
"_postal_code=feat.overlapWith('postal_codes')[0]?.feat?.properties?.postal_code"
],
"_postal_code_properties=(() => { const f = feat.overlapWith('postal_code_boundary'); if(f.length===0){return {};}; const p = f[0]?.feat?.properties; return {id:p.id, postal_code: p.postal_code, _closest_town_hall: p._closest_town_hall}; })()",
"_postal_code=feat.get('_postal_code_properties')?.postal_code",
"_postal_code_center_distance=feat.distanceTo(feat.get('_postal_code_properties').id)"
],
"description": {},
"tagRenderings": [
],
"presets": [],
"source": {
"isOsmCache": true,
"geoJson": "http://127.0.0.1:8080/postal_codes_town_hall_{z}_{x}_{y}.geojson",
"geoJsonZoomLevel": 1,
"osmTags": "amenity=townhall"
},
"mapRendering": [
{
"icon": {
"render": "./assets/svg/bug.svg"
},
{ "icon": "./assets/themes/postal_codes/townhall.svg",
"iconSize": {
"render": "40,40,center"
},
@ -125,14 +116,6 @@
"point",
"centroid"
]
},
{
"color": {
"render": "#00f"
},
"width": {
"render": "8"
}
}
],
"isShown": {

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="16"
height="16"
viewBox="0 0 16 16"
id="svg2">
<metadata id="metadata8">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs id="defs6"/>
<rect width="16" height="16" x="0" y="0" id="canvas" style="fill:none;stroke:none;visibility:hidden"/>
<path d="M 7,0 C 6.75,0.0032 6.5,0.1644239 6.5,0.5 L 6.5,4.375 1,7 13,7 7.5,4.375 7.5,0.5 C 7.5,0.1516409 7.25,-0.0031957 7,0 z M 8,0 8,3 12,3 10,1.5 12,0 z m -7,8 0,1 1,0 0,4 -1,0 0,1 12,0 0,-1 -1,0 0,-4 1,0 0,-1 z m 6,1.5 c 1,0 2,0.5 2,1.5 l 0,2 -4,0 0,-2 C 5,10 6,9.5 7,9.5 z" id="town-hall" style="fill:#734a08;fill-opacity:1;stroke:none" transform="translate(1,1)"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB