forked from MapComplete/MapComplete
Improvements to the postal code theme
This commit is contained in:
parent
98d92e763a
commit
35645e7f83
1 changed files with 20 additions and 13 deletions
|
@ -78,17 +78,22 @@
|
||||||
],
|
],
|
||||||
"isShown": {
|
"isShown": {
|
||||||
"render": "yes",
|
"render": "yes",
|
||||||
"mappings": [{
|
"mappings": [
|
||||||
"if" :"_country!=be",
|
{
|
||||||
"then": "no"
|
"if": "_country!=be",
|
||||||
}]
|
"then": "no"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "wrong_postal_code",
|
"id": "wrong_postal_code",
|
||||||
"source": {
|
"source": {
|
||||||
"osmTags": {
|
"osmTags": {
|
||||||
"and": ["boundary~*","addr:postcode~*"]
|
"and": [
|
||||||
|
"boundary~*",
|
||||||
|
"addr:postcode~*"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"title": "Boundary relation with addr:postcode={addr:postcode}",
|
"title": "Boundary relation with addr:postcode={addr:postcode}",
|
||||||
|
@ -114,16 +119,16 @@
|
||||||
"_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_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=feat.get('_postal_code_properties')?.postal_code",
|
||||||
"_postal_code_center_distance=feat.distanceTo(feat.get('_postal_code_properties').id)"
|
"_postal_code_center_distance=feat.distanceTo(feat.get('_postal_code_properties').id)"
|
||||||
],
|
|
||||||
"description": {},
|
|
||||||
"tagRenderings": [
|
|
||||||
],
|
],
|
||||||
|
"description": {},
|
||||||
|
"tagRenderings": [],
|
||||||
"presets": [],
|
"presets": [],
|
||||||
"source": {
|
"source": {
|
||||||
"osmTags": "amenity=townhall"
|
"osmTags": "amenity=townhall"
|
||||||
},
|
},
|
||||||
"mapRendering": [
|
"mapRendering": [
|
||||||
{ "icon": "./assets/themes/postal_codes/townhall.svg",
|
{
|
||||||
|
"icon": "./assets/themes/postal_codes/townhall.svg",
|
||||||
"iconSize": {
|
"iconSize": {
|
||||||
"render": "40,40,center"
|
"render": "40,40,center"
|
||||||
},
|
},
|
||||||
|
@ -135,10 +140,12 @@
|
||||||
],
|
],
|
||||||
"isShown": {
|
"isShown": {
|
||||||
"render": "yes",
|
"render": "yes",
|
||||||
"mappings": [{
|
"mappings": [
|
||||||
"if" :"_country!=be",
|
{
|
||||||
"then": "no"
|
"if": "_country!=be",
|
||||||
}]
|
"then": "no"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue