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",
 | 
					          "if": "memorial=stolperstein",
 | 
				
			||||||
          "alsoShowIf": "memorial:type=stolperstein",
 | 
					 | 
				
			||||||
          "then": {
 | 
					          "then": {
 | 
				
			||||||
            "en": "This is a stolperstein (stumbing stone)",
 | 
					            "en": "This is a stolperstein (stumbing stone)",
 | 
				
			||||||
            "de": "Dies ist ein Stolperstein",
 | 
					            "de": "Dies ist ein Stolperstein",
 | 
				
			||||||
| 
						 | 
					@ -270,7 +269,9 @@
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "freeform": {
 | 
					      "freeform": {
 | 
				
			||||||
        "key": "memorial"
 | 
					        "key": "memorial"
 | 
				
			||||||
      }
 | 
					      },
 | 
				
			||||||
 | 
					      "filter": true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "id": "inscription",
 | 
					      "id": "inscription",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -35,6 +35,7 @@ import { ExpandRewrite } from "./ExpandRewrite"
 | 
				
			||||||
import { TagUtils } from "../../../Logic/Tags/TagUtils"
 | 
					import { TagUtils } from "../../../Logic/Tags/TagUtils"
 | 
				
			||||||
import { Tag } from "../../../Logic/Tags/Tag"
 | 
					import { Tag } from "../../../Logic/Tags/Tag"
 | 
				
			||||||
import { RegexTag } from "../../../Logic/Tags/RegexTag"
 | 
					import { RegexTag } from "../../../Logic/Tags/RegexTag"
 | 
				
			||||||
 | 
					import { Or } from "../../../Logic/Tags/Or"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class AddFiltersFromTagRenderings extends DesugaringStep<LayerConfigJson> {
 | 
					class AddFiltersFromTagRenderings extends DesugaringStep<LayerConfigJson> {
 | 
				
			||||||
    constructor() {
 | 
					    constructor() {
 | 
				
			||||||
| 
						 | 
					@ -152,6 +153,9 @@ class ExpandFilter extends DesugaringStep<LayerConfigJson> {
 | 
				
			||||||
            if(qtr.multiAnswer && osmTags instanceof Tag){
 | 
					            if(qtr.multiAnswer && osmTags instanceof Tag){
 | 
				
			||||||
                osmTags = new RegexTag(osmTags.key, new RegExp("^(.+;)?"+osmTags.value+"(;.+)$","is"))
 | 
					                osmTags = new RegexTag(osmTags.key, new RegExp("^(.+;)?"+osmTags.value+"(;.+)$","is"))
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            if(mapping.alsoShowIf){
 | 
				
			||||||
 | 
					                osmTags= new Or([osmTags, TagUtils.Tag(mapping.alsoShowIf)])
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return <FilterConfigOptionJson>{
 | 
					            return <FilterConfigOptionJson>{
 | 
				
			||||||
                question: mapping.then,
 | 
					                question: mapping.then,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue