forked from MapComplete/MapComplete
Add level selector and global filters
This commit is contained in:
parent
5504d49d59
commit
7fd7a3722e
19 changed files with 401 additions and 253 deletions
|
@ -186,6 +186,12 @@ export default class FilteredLayer {
|
|||
if (properties._deleted === "yes") {
|
||||
return false
|
||||
}
|
||||
for (const globalFilter of globalFilters ?? []) {
|
||||
const neededTags = globalFilter.osmTags
|
||||
if (neededTags !== undefined && !neededTags.matchesProperties(properties)) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
{
|
||||
const isShown: TagsFilter = this.layerDef.isShown
|
||||
if (isShown !== undefined && !isShown.matchesProperties(properties)) {
|
||||
|
@ -200,12 +206,6 @@ export default class FilteredLayer {
|
|||
}
|
||||
}
|
||||
|
||||
for (const globalFilter of globalFilters ?? []) {
|
||||
const neededTags = globalFilter.osmTags
|
||||
if (neededTags !== undefined && !neededTags.matchesProperties(properties)) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue