forked from MapComplete/MapComplete
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.*"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
"options": [
|
||||
{
|
||||
"question": "Name contains 'alt'",
|
||||
"osmTags": "name~.*[aA]lt.*"
|
||||
"osmTags": "name~i~.*alt.*"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -137,7 +137,7 @@
|
|||
"options": [
|
||||
{
|
||||
"question": "Name contains 'wenslijn'",
|
||||
"osmTags": "name~.*[wW]enslijn.*"
|
||||
"osmTags": "name~i~.*wenslijn.*"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -146,7 +146,7 @@
|
|||
"options": [
|
||||
{
|
||||
"question": "Name contains 'omleiding'",
|
||||
"osmTags": "name~.*[oO]mleiding.*"
|
||||
"osmTags": "name~i~.*omleiding.*"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -155,7 +155,7 @@
|
|||
"options": [
|
||||
{
|
||||
"question": "Reference contains 'alt'",
|
||||
"osmTags": "ref~.*[aA]lt.*"
|
||||
"osmTags": "ref~i~.*aAlt.*"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -1,21 +1,13 @@
|
|||
{
|
||||
"id": "mapcomplete-changes",
|
||||
"title": {
|
||||
"en": "Changes made with MapComplete",
|
||||
"de": "Änderungen mit MapComplete",
|
||||
"es": "Cambios hechos con MapComplete",
|
||||
"nb_NO": "Endringer utført med MapComplete"
|
||||
"en": "Changes made with MapComplete"
|
||||
},
|
||||
"shortDescription": {
|
||||
"en": "Shows changes made by MapComplete",
|
||||
"de": "Zeigt Änderungen von MapComplete",
|
||||
"es": "Muestra los cambios hechos por MapComplete",
|
||||
"nb_NO": "Vis endringer utført med MapComplete"
|
||||
"en": "Shows changes made by MapComplete"
|
||||
},
|
||||
"description": {
|
||||
"en": "This maps shows all the changes made with MapComplete",
|
||||
"de": "Diese Karte zeigt alle Änderungen die mit MapComplete gemacht wurden",
|
||||
"es": "Este mapa muestra todos los cambios hechos con MapComplete"
|
||||
"en": "This maps shows all the changes made with MapComplete"
|
||||
},
|
||||
"maintainer": "",
|
||||
"icon": "./assets/svg/logo.svg",
|
||||
|
@ -30,10 +22,7 @@
|
|||
{
|
||||
"id": "mapcomplete-changes",
|
||||
"name": {
|
||||
"en": "Changeset centers",
|
||||
"de": "Schwerpunkte von Änderungssätzen",
|
||||
"es": "Centros de conjuntos de cambios",
|
||||
"nb_NO": "Endringssettsenter"
|
||||
"en": "Changeset centers"
|
||||
},
|
||||
"minzoom": 0,
|
||||
"source": {
|
||||
|
@ -47,47 +36,35 @@
|
|||
],
|
||||
"title": {
|
||||
"render": {
|
||||
"en": "Changeset for {theme}",
|
||||
"de": "Änderungen für {theme}",
|
||||
"es": "Conjunto de cambios para {theme}",
|
||||
"nb_NO": "Endringssett for {theme}"
|
||||
"en": "Changeset for {theme}"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"en": "Shows all MapComplete changes",
|
||||
"de": "Zeigt alle MapComplete Änderungen",
|
||||
"es": "Muestra todos los cambios de MapComplete"
|
||||
"en": "Shows all MapComplete changes"
|
||||
},
|
||||
"tagRenderings": [
|
||||
{
|
||||
"id": "render_id",
|
||||
"render": {
|
||||
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
|
||||
"de": "Änderung <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
|
||||
"es": "Conjunto de cambios <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
|
||||
"nb_NO": "Endringssett <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
|
||||
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "contributor",
|
||||
"render": {
|
||||
"en": "Change made by <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>",
|
||||
"de": "Änderung wurde von <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a> gemacht",
|
||||
"es": "Cambio hecho por <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>"
|
||||
"en": "Change made by <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "theme",
|
||||
"render": {
|
||||
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>",
|
||||
"de": "Änderung mit Thema <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
|
||||
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": "theme~http.*",
|
||||
"then": {
|
||||
"en": "Change with <b>unofficial</b> theme <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>",
|
||||
"de": "Änderung mit <b>inoffiziellem</b> Thema <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>"
|
||||
"en": "Change with <b>unofficial</b> theme <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -352,16 +329,14 @@
|
|||
"id": "theme-search",
|
||||
"options": [
|
||||
{
|
||||
"osmTags": "theme~.*{search}.*",
|
||||
"osmTags": "theme~i~.*{search}.*",
|
||||
"fields": [
|
||||
{
|
||||
"name": "search"
|
||||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Themename contains {search}",
|
||||
"de": "Themenname enthält {search}",
|
||||
"nb_NO": "Temanavn inneholder {search}"
|
||||
"en": "Themename contains {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -370,16 +345,14 @@
|
|||
"id": "created_by",
|
||||
"options": [
|
||||
{
|
||||
"osmTags": "_last_edit:contributor:lc~.*{search}.*",
|
||||
"osmTags": "_last_edit:contributor:lc~i~.*{search}.*",
|
||||
"fields": [
|
||||
{
|
||||
"name": "search"
|
||||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Made by contributor {search}",
|
||||
"de": "Erstellt von {search}",
|
||||
"es": "Hecho por contributor/a {search}"
|
||||
"en": "Made by contributor {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -388,16 +361,14 @@
|
|||
"id": "not_created_by",
|
||||
"options": [
|
||||
{
|
||||
"osmTags": "_last_edit:contributor:lc!~.*{search}.*",
|
||||
"osmTags": "_last_edit:contributor:lc!~i~.*{search}.*",
|
||||
"fields": [
|
||||
{
|
||||
"name": "search"
|
||||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "<b>Not</b> made by contributor {search}",
|
||||
"de": "<b>Nicht</b> erstellt von {search}",
|
||||
"es": "<b>No</b> hecho por contributor/a {search}"
|
||||
"en": "<b>Not</b> made by contributor {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -412,9 +383,7 @@
|
|||
{
|
||||
"id": "link_to_more",
|
||||
"render": {
|
||||
"en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>",
|
||||
"de": "Weitere Statistiken finden Sie <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>hier</a>",
|
||||
"es": "Se pueden encontrar más estadísticas <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>aquí</a>"
|
||||
"en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
"id": "theme-search",
|
||||
"options": [
|
||||
{
|
||||
"osmTags": "theme~.*{search}.*",
|
||||
"osmTags": "theme~i~.*{search}.*",
|
||||
"fields": [
|
||||
{
|
||||
"name": "search"
|
||||
|
@ -103,7 +103,7 @@
|
|||
"id": "created_by",
|
||||
"options": [
|
||||
{
|
||||
"osmTags": "_last_edit:contributor:lc~.*{search}.*",
|
||||
"osmTags": "_last_edit:contributor:lc~i~.*{search}.*",
|
||||
"fields": [
|
||||
{
|
||||
"name": "search"
|
||||
|
@ -119,7 +119,7 @@
|
|||
"id": "not_created_by",
|
||||
"options": [
|
||||
{
|
||||
"osmTags": "_last_edit:contributor:lc!~.*{search}.*",
|
||||
"osmTags": "_last_edit:contributor:lc!~i~.*{search}.*",
|
||||
"fields": [
|
||||
{
|
||||
"name": "search"
|
||||
|
|
Loading…
Reference in a new issue