Various fixes
This commit is contained in:
parent
18044ff22b
commit
07fd8f404a
14 changed files with 154 additions and 60 deletions
130
assets/themes/postal_codes/postal_codes.json
Normal file
130
assets/themes/postal_codes/postal_codes.json
Normal file
|
@ -0,0 +1,130 @@
|
|||
{
|
||||
"id": "postal_codes",
|
||||
"title": {
|
||||
"en": "Postal codes"
|
||||
},
|
||||
"shortDescription": {
|
||||
"en": "Postal codes"
|
||||
},
|
||||
"description": {
|
||||
"en": "Postal codes"
|
||||
},
|
||||
"language": [
|
||||
"en"
|
||||
],
|
||||
"maintainer": "",
|
||||
"icon": "./assets/themes/postal_codes/townhall.svg",
|
||||
"version": "0",
|
||||
"startLat": 0,
|
||||
"startLon": 0,
|
||||
"startZoom": 1,
|
||||
"widenFactor": 0.05,
|
||||
"socialImage": "",
|
||||
"hideFromOverview": true,
|
||||
"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": "town_hall",
|
||||
"name": {
|
||||
"en": "town halls"
|
||||
},
|
||||
"minzoom": 12,
|
||||
"title": {
|
||||
"render": {
|
||||
"en": "Town hall {name}"
|
||||
}
|
||||
},
|
||||
"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)"
|
||||
],
|
||||
"description": {},
|
||||
"tagRenderings": [
|
||||
],
|
||||
"presets": [],
|
||||
"source": {
|
||||
"osmTags": "amenity=townhall"
|
||||
},
|
||||
"mapRendering": [
|
||||
{ "icon": "./assets/themes/postal_codes/townhall.svg",
|
||||
"iconSize": {
|
||||
"render": "40,40,center"
|
||||
},
|
||||
"location": [
|
||||
"point",
|
||||
"centroid"
|
||||
]
|
||||
}
|
||||
],
|
||||
"isShown": {
|
||||
"render": "yes",
|
||||
"mappings": [{
|
||||
"if" :"_country!=be",
|
||||
"then": "no"
|
||||
}]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue