forked from MapComplete/MapComplete
Themes(memorial): add filter on type of memorial, remove obsolete 'memorial:type=stolperstein'
This commit is contained in:
parent
4dc48bc57a
commit
1415fcdfec
2 changed files with 7 additions and 2 deletions
|
@ -151,7 +151,6 @@
|
|||
},
|
||||
{
|
||||
"if": "memorial=stolperstein",
|
||||
"alsoShowIf": "memorial:type=stolperstein",
|
||||
"then": {
|
||||
"en": "This is a stolperstein (stumbing stone)",
|
||||
"de": "Dies ist ein Stolperstein",
|
||||
|
@ -270,7 +269,9 @@
|
|||
},
|
||||
"freeform": {
|
||||
"key": "memorial"
|
||||
}
|
||||
},
|
||||
"filter": true
|
||||
|
||||
},
|
||||
{
|
||||
"id": "inscription",
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue