Formatting, comments, use injected download functionality

This commit is contained in:
Pieter Vander Vennet 2021-12-13 20:51:44 +01:00
parent 7b774b2aa3
commit dc5c3461f8
7 changed files with 47 additions and 98 deletions

View file

@ -24,90 +24,10 @@
"clustering": false,
"overpassTimeout": 180,
"layers": [
{
"id": "postal_code_boundary",
"name": {
"en": "postal codes"
},
"minzoom": 8,
"title": {
"render": {
"en": "Postal code {postal_code}"
}
},
"description": {},
"tagRenderings": [
{
"id": "postal_code",
"render": {
"en": "The postal code is {postal_code}"
}
}
],
"source": {
"osmTags": {
"or": [
"boundary=postal_code",
{
"and": [
"bounary=administrative",
"postal_code~*"
]
}
]
}
},
"mapRendering": [
{
"label": "<div class='text-xl bg-white rounded-full pl-2 pr-2 break-normal'>{postal_code}</div>",
"location": [
"point",
"centroid"
]
},
{
"color": {
"render": "#00f"
},
"width": {
"render": "4"
},
"fill": "no",
"dashArray": "8 8"
}
],
"isShown": {
"render": "yes",
"mappings": [
{
"if": "_country!=be",
"then": "no"
}
]
}
},
{
"id": "wrong_postal_code",
"source": {
"osmTags": {
"and": [
"boundary~*",
"addr:postcode~*"
]
}
},
"title": "Boundary relation with addr:postcode={addr:postcode}",
"mapRendering": [
{
"color": "#f00",
"width": 1
}
]
},
{
"id": "town_hall",
"name": {
"en": "town halls"
"en": "town halls and churches"
},
"minzoom": 12,
"title": {
@ -115,7 +35,7 @@
"en": "Town hall {name}"
}
},
"calculatedTags": [
"#calculatedTags": [
"_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)"
@ -124,7 +44,9 @@
"tagRenderings": [],
"presets": [],
"source": {
"osmTags": "amenity=townhall"
"osmTags": {
"or": ["amenity=townhall","building=church"]
}
},
"mapRendering": [
{