Themes(memorial): add filter on type of memorial, remove obsolete 'memorial:type=stolperstein'

This commit is contained in:
Pieter Vander Vennet 2024-11-03 18:59:22 +01:00
parent 4dc48bc57a
commit 1415fcdfec
2 changed files with 7 additions and 2 deletions

View file

@ -35,6 +35,7 @@ import { ExpandRewrite } from "./ExpandRewrite"
import { TagUtils } from "../../../Logic/Tags/TagUtils"
import { Tag } from "../../../Logic/Tags/Tag"
import { RegexTag } from "../../../Logic/Tags/RegexTag"
import { Or } from "../../../Logic/Tags/Or"
class AddFiltersFromTagRenderings extends DesugaringStep<LayerConfigJson> {
constructor() {
@ -152,6 +153,9 @@ class ExpandFilter extends DesugaringStep<LayerConfigJson> {
if(qtr.multiAnswer && osmTags instanceof Tag){
osmTags = new RegexTag(osmTags.key, new RegExp("^(.+;)?"+osmTags.value+"(;.+)$","is"))
}
if(mapping.alsoShowIf){
osmTags= new Or([osmTags, TagUtils.Tag(mapping.alsoShowIf)])
}
return <FilterConfigOptionJson>{
question: mapping.then,