Add tests for tags, add check for duplicate names as layer ids, fix #393

This commit is contained in:
Pieter Vander Vennet 2021-07-12 11:44:55 +02:00
parent fa9313a3b7
commit 33e2dca7e4
7 changed files with 95 additions and 60 deletions

View file

@ -10,7 +10,12 @@
{
"or": [
"leisure=nature_reserve",
"boundary=protected_area"
{
"and": [
"protect_class!=98",
"boundary=protected_area"
]
}
]
}
]

View file

@ -29,7 +29,7 @@
"socialImage": "./assets/themes/buurtnatuur/social_image.jpg",
"layers": [
{
"id": "nature_reserve",
"id": "nature_reserve_buurtnatuur",
"name": {
"nl": "Natuurgebied"
},
@ -141,7 +141,7 @@
}
},
"calculatedTags": [
"_overlapWithUpperLayers=Math.max(...feat.overlapWith('nature_reserve').map(o => o.overlap))/feat.area",
"_overlapWithUpperLayers=Math.max(...feat.overlapWith('nature_reserve_buurtnatuur').map(o => o.overlap))/feat.area",
"_tooMuchOverlap=Number(feat.properties._overlapWithUpperLayers) > 0.1 ? 'yes' :'no'"
],
"isShown": {
@ -240,7 +240,7 @@
}
},
"calculatedTags": [
"_overlapWithUpperLayers=Math.max(...feat.overlapWith('parks','nature_reserve').map(o => o.overlap))/feat.area",
"_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": {