Use case invariant search in all filters
This commit is contained in:
parent
a253754b98
commit
ad1b48ca4e
7 changed files with 42 additions and 74 deletions
|
@ -33,12 +33,11 @@
|
|||
},
|
||||
"calculatedTags": [
|
||||
"_total_comments:=feat.get('comments').length",
|
||||
"_first_comment:=feat.get('comments')[0].text.toLowerCase()",
|
||||
"_first_comment:=feat.get('comments')[0].text",
|
||||
"_opened_by_anonymous_user:=feat.get('comments')[0].user === undefined",
|
||||
"_first_user:=feat.get('comments')[0].user",
|
||||
"_first_user_lc:=feat.get('comments')[0].user?.toLowerCase()",
|
||||
"_last_user:=(() => {const comms = feat.get('comments'); return comms[comms.length - 1].user})()",
|
||||
"_first_user_id:=feat.get('comments')[0].uid",
|
||||
"_last_user_lc:=(() => {const comms = feat.get('comments'); return comms[comms.length - 1].user?.toLowerCase()})()",
|
||||
"_is_import_note:=(() => {const lines = feat.properties['_first_comment'].split('\\n'); const matchesMapCompleteURL = lines.map(l => l.match(\".*https://mapcomplete.osm.be/\\([a-zA-Z_-]+\\)\\(.html\\).*#import\")); const matchedIndexes = matchesMapCompleteURL.map((doesMatch, i) => [doesMatch !== null, i]).filter(v => v[0]).map(v => v[1]); return matchedIndexes[0] })()"
|
||||
],
|
||||
"titleIcons": [
|
||||
|
@ -123,7 +122,7 @@
|
|||
"id": "search",
|
||||
"options": [
|
||||
{
|
||||
"osmTags": "_first_comment~.*{search}.*",
|
||||
"osmTags": "_first_comment~i~.*{search}.*",
|
||||
"fields": [
|
||||
{
|
||||
"name": "search"
|
||||
|
@ -141,7 +140,7 @@
|
|||
"id": "not",
|
||||
"options": [
|
||||
{
|
||||
"osmTags": "_first_comment!~.*{search}.*",
|
||||
"osmTags": "_first_comment!~i~.*{search}.*",
|
||||
"fields": [
|
||||
{
|
||||
"name": "search"
|
||||
|
@ -159,7 +158,7 @@
|
|||
"id": "opened_by",
|
||||
"options": [
|
||||
{
|
||||
"osmTags": "_first_user_lc~.*{search}.*",
|
||||
"osmTags": "_first_user~i~.*{search}.*",
|
||||
"fields": [
|
||||
{
|
||||
"name": "search"
|
||||
|
@ -177,7 +176,7 @@
|
|||
"id": "not_opened_by",
|
||||
"options": [
|
||||
{
|
||||
"osmTags": "_first_user_lc!~.*{search}.*",
|
||||
"osmTags": "_first_user!~i~.*{search}.*",
|
||||
"fields": [
|
||||
{
|
||||
"name": "search"
|
||||
|
@ -195,7 +194,7 @@
|
|||
"id": "edited_by",
|
||||
"options": [
|
||||
{
|
||||
"osmTags": "_last_user_lc~.*{search}.*",
|
||||
"osmTags": "_last_user~i~.*{search}.*",
|
||||
"fields": [
|
||||
{
|
||||
"name": "search"
|
||||
|
@ -213,7 +212,7 @@
|
|||
"id": "not_edited_by",
|
||||
"options": [
|
||||
{
|
||||
"osmTags": "_last_user_lc!~.*{search}.*",
|
||||
"osmTags": "_last_user!~i~.*{search}.*",
|
||||
"fields": [
|
||||
{
|
||||
"name": "search"
|
||||
|
|
|
@ -468,7 +468,7 @@
|
|||
"options": [
|
||||
{
|
||||
"question": "Kinderboeken aanwezig?",
|
||||
"osmTags": "books~.*children.*"
|
||||
"osmTags": "books~i~.*children.*"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -477,7 +477,7 @@
|
|||
"options": [
|
||||
{
|
||||
"question": "Boeken voor volwassenen aanwezig?",
|
||||
"osmTags": "books~.*adults.*"
|
||||
"osmTags": "books~i~.*adults.*"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -432,7 +432,7 @@
|
|||
"type": "string"
|
||||
}
|
||||
],
|
||||
"osmTags": "shop~^.*{search}.*$",
|
||||
"osmTags": "shop~i~.*{search}.*",
|
||||
"question": {
|
||||
"en": "Only show shops selling {search}",
|
||||
"de": "Nur Geschäfte, die {search} verkaufen",
|
||||
|
@ -451,7 +451,7 @@
|
|||
"type": "string"
|
||||
}
|
||||
],
|
||||
"osmTags": "name~^.*{search}.*$",
|
||||
"osmTags": "name~i~.*{search}.*",
|
||||
"question": {
|
||||
"en": "Only show shops with name {search}",
|
||||
"de": "Nur Geschäfte mit dem Namen {search} anzeigen",
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
"nl": "Vuilnisbak voor sigarettenpeuken",
|
||||
"de": "Mülleimer für Zigaretten"
|
||||
},
|
||||
"osmTags": "waste~.*cigarettes.*"
|
||||
"osmTags": "waste~i~.*cigarettes.*"
|
||||
},
|
||||
{
|
||||
"question": {
|
||||
|
@ -211,7 +211,7 @@
|
|||
"nl": "Vuilnisbak voor (vervallen) medicatie en drugs",
|
||||
"de": "Mülleimer für Drogen"
|
||||
},
|
||||
"osmTags": "waste~.*drugs.*"
|
||||
"osmTags": "waste~i~.*drugs.*"
|
||||
},
|
||||
{
|
||||
"question": {
|
||||
|
@ -219,7 +219,7 @@
|
|||
"nl": "Vuilnisbak voor hondenuitwerpselen",
|
||||
"de": "Mülleimer für Hundekot"
|
||||
},
|
||||
"osmTags": "waste~.*dog_excrement.*"
|
||||
"osmTags": "waste~i~.*dog_excrement.*"
|
||||
},
|
||||
{
|
||||
"question": {
|
||||
|
@ -227,7 +227,7 @@
|
|||
"nl": "Vuilnisbak voor zwerfvuil",
|
||||
"de": "Mülleimer für allgemeinen Müll"
|
||||
},
|
||||
"osmTags": "waste~.*trash.*"
|
||||
"osmTags": "waste~i~.*trash.*"
|
||||
},
|
||||
{
|
||||
"question": {
|
||||
|
@ -235,7 +235,7 @@
|
|||
"nl": "Vuilnisbak voor injectienaalden en andere scherpe voorwerpen",
|
||||
"de": "Mülleimer für Nadeln und andere scharfe Gegenstände"
|
||||
},
|
||||
"osmTags": "waste~.*sharps.*"
|
||||
"osmTags": "waste~i~.*sharps.*"
|
||||
},
|
||||
{
|
||||
"question": {
|
||||
|
@ -243,7 +243,7 @@
|
|||
"nl": "Vuilnisbak voor plastic",
|
||||
"de": "Mülleimer für Plastik"
|
||||
},
|
||||
"osmTags": "waste~.*plastic.*"
|
||||
"osmTags": "waste~i~.*plastic.*"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue