2021-12-07 02:22:56 +01:00
|
|
|
{
|
|
|
|
"id": "postal_codes",
|
|
|
|
"title": {
|
|
|
|
"en": "Postal codes"
|
|
|
|
},
|
|
|
|
"shortDescription": {
|
|
|
|
"en": "Postal codes"
|
|
|
|
},
|
|
|
|
"description": {
|
|
|
|
"en": "Postal codes"
|
|
|
|
},
|
|
|
|
"language": [
|
|
|
|
"en"
|
|
|
|
],
|
|
|
|
"maintainer": "",
|
2021-12-07 17:46:57 +01:00
|
|
|
"icon": "./assets/themes/postal_codes/townhall.svg",
|
2021-12-07 02:22:56 +01:00
|
|
|
"version": "0",
|
|
|
|
"startLat": 0,
|
|
|
|
"startLon": 0,
|
|
|
|
"startZoom": 1,
|
|
|
|
"widenFactor": 0.05,
|
|
|
|
"socialImage": "",
|
2021-12-07 02:23:26 +01:00
|
|
|
"hideFromOverview": true,
|
2021-12-07 17:46:57 +01:00
|
|
|
"clustering": false,
|
|
|
|
"overpassTimeout": 180,
|
2021-12-07 02:22:56 +01:00
|
|
|
"layers": [
|
|
|
|
{
|
2021-12-07 17:46:57 +01:00
|
|
|
"id": "postal_code_boundary",
|
2021-12-07 02:22:56 +01:00
|
|
|
"name": {
|
|
|
|
"en": "postal codes"
|
|
|
|
},
|
2021-12-07 17:46:57 +01:00
|
|
|
"minzoom": 8,
|
2021-12-07 02:22:56 +01:00
|
|
|
"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": [
|
|
|
|
{
|
2021-12-07 17:46:57 +01:00
|
|
|
"label": "<div class='text-xl bg-white rounded-full pl-2 pr-2 break-normal'>{postal_code}</div>",
|
2021-12-07 02:22:56 +01:00
|
|
|
"location": [
|
|
|
|
"point",
|
|
|
|
"centroid"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"color": {
|
|
|
|
"render": "#00f"
|
|
|
|
},
|
|
|
|
"width": {
|
2021-12-07 17:46:57 +01:00
|
|
|
"render": "4"
|
|
|
|
},
|
|
|
|
"fill": "no",
|
|
|
|
"dashArray": "8 8"
|
2021-12-07 02:22:56 +01:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"isShown": {
|
|
|
|
"render": "yes",
|
|
|
|
"mappings": [{
|
|
|
|
"if" :"_country!=be",
|
|
|
|
"then": "no"
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
},
|
2021-12-09 01:22:57 +01:00
|
|
|
{
|
|
|
|
"id": "wrong_postal_code",
|
|
|
|
"source": {
|
|
|
|
"osmTags": {
|
|
|
|
"and": ["boundary~*","addr:postcode~*"]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"title": "Boundary relation with addr:postcode={addr:postcode}",
|
|
|
|
"mapRendering": [
|
|
|
|
{
|
|
|
|
"color": "#f00",
|
|
|
|
"width": 1
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2021-12-07 02:22:56 +01:00
|
|
|
{
|
2021-12-07 17:46:57 +01:00
|
|
|
"id": "town_hall",
|
2021-12-07 02:22:56 +01:00
|
|
|
"name": {
|
|
|
|
"en": "town halls"
|
|
|
|
},
|
|
|
|
"minzoom": 12,
|
|
|
|
"title": {
|
|
|
|
"render": {
|
2021-12-07 17:46:57 +01:00
|
|
|
"en": "Town hall {name}"
|
2021-12-07 02:22:56 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"calculatedTags": [
|
2021-12-07 17:46:57 +01:00
|
|
|
"_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)"
|
|
|
|
],
|
2021-12-07 02:22:56 +01:00
|
|
|
"description": {},
|
|
|
|
"tagRenderings": [
|
|
|
|
],
|
|
|
|
"presets": [],
|
|
|
|
"source": {
|
|
|
|
"osmTags": "amenity=townhall"
|
|
|
|
},
|
|
|
|
"mapRendering": [
|
2021-12-07 17:46:57 +01:00
|
|
|
{ "icon": "./assets/themes/postal_codes/townhall.svg",
|
2021-12-07 02:22:56 +01:00
|
|
|
"iconSize": {
|
|
|
|
"render": "40,40,center"
|
|
|
|
},
|
|
|
|
"location": [
|
|
|
|
"point",
|
|
|
|
"centroid"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"isShown": {
|
|
|
|
"render": "yes",
|
|
|
|
"mappings": [{
|
|
|
|
"if" :"_country!=be",
|
|
|
|
"then": "no"
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|