Refactor isShown into a tagsfilter

This commit is contained in:
Pieter Vander Vennet 2022-07-18 02:00:32 +02:00
parent dab0565a8b
commit b8bca0287d
13 changed files with 64 additions and 123 deletions

View file

@ -34,7 +34,9 @@
"osmTags": {
"or": [
"leisure=nature_reserve",
"boundary=protected_area"
{
"and": ["boundary=protected_area","protect_class!=22"]
}
]
}
},
@ -149,15 +151,7 @@
"_overlapWithUpperLayers=Math.max(...feat.overlapWith('nature_reserve_buurtnatuur').map(o => o.overlap))/feat.area",
"_tooMuchOverlap=Number(feat.properties._overlapWithUpperLayers) > 0.1 ? 'yes' :'no'"
],
"isShown": {
"render": "yes",
"mappings": [
{
"if": "_tooMuchOverlap=yes",
"then": "no"
}
]
},
"isShown": "_tooMuchOverlap!=yes",
"title": {
"render": {
"nl": "Park"
@ -257,15 +251,7 @@
"_overlapWithUpperLayers=Math.max(...feat.overlapWith('parks','nature_reserve_buurtnatuur').map(o => o.overlap))/feat.area",
"_tooMuchOverlap=Number(feat.properties._overlapWithUpperLayers) > 0.1 ? 'yes' : 'no'"
],
"isShown": {
"render": "yes",
"mappings": [
{
"if": "_tooMuchOverlap=yes",
"then": "no"
}
]
},
"isShown": "_tooMuchOverlap!=yes",
"title": {
"render": {
"nl": "Bos"