From 7d8696c0ba63649e4cfb1b17f97179b511f04cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 27 Aug 2017 07:17:08 +0200 Subject: [PATCH 01/14] Gastro: filters --- gastro.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gastro.json b/gastro.json index 028f8b35f..b15b36486 100644 --- a/gastro.json +++ b/gastro.json @@ -33,5 +33,25 @@ "" ], "markerSign": "{% if tags.amenity=='bar' %}🍸{% elseif tags.amenity=='biergarten'%}🍻{% elseif tags.amenity=='cafe' %}☕{% elseif tags.amenity=='fast_food' %}🍔{% elseif tags.amenity=='ice_cream' %}🍨{% elseif tags.amenity=='pub' %}🍺{% else %}🍴{% endif %}" + }, + "filter": { + "amenity": { + "name": "tag:amenity", + "type": "select", + "values": "auto", + "op": "=" + }, + "cuisine": { + "name": "tag:cuisine", + "type": "select", + "values": [ + "kebab", + "pizza", + "sausage", + "asian", + "chinese" + ], + "op": "has" + } } } From e0cc338c2a3e96b1aac6a7bc4a898bb2543c1ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sat, 11 Aug 2018 22:09:55 +0200 Subject: [PATCH 02/14] gastro: more filter values, auto names --- gastro.json | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/gastro.json b/gastro.json index b15b36486..ac64283b8 100644 --- a/gastro.json +++ b/gastro.json @@ -36,21 +36,20 @@ }, "filter": { "amenity": { - "name": "tag:amenity", "type": "select", - "values": "auto", + "values": [ + "bar", + "biergarten", + "cafe", + "fast_food", + "ice_cream", + "pub" + ], "op": "=" }, "cuisine": { - "name": "tag:cuisine", - "type": "select", - "values": [ - "kebab", - "pizza", - "sausage", - "asian", - "chinese" - ], + "type": "autocomplete", + "values": [ "afghan", "arab", "asian", "australian", "austrian", "barbecue", "burger", "cake", "caribbean", "caribean", "chinese", "coffee", "coffee_shop", "crepe", "empanada", "fish_and_chips", "french", "fried_food", "friture", "greek", "gyros", "ice_cream", "indian", "international", "italian", "japanese", "juice", "kebab", "korean", "local", "mexican", "noodles", "pasta", "pie", "pizza", "regional", "salad", "sandwich", "sausage", "seafood", "soup", "spanish", "steak_house", "sushi", "thai", "turkish", "vegan", "vegetarian", "vietnamese" ], "op": "has" } } From 2b196f522f1cf4df5856de773036f69424e63aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 1 Apr 2018 20:23:55 +0200 Subject: [PATCH 03/14] Gastro: improve filter --- gastro.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gastro.json b/gastro.json index ac64283b8..687824397 100644 --- a/gastro.json +++ b/gastro.json @@ -35,6 +35,12 @@ "markerSign": "{% if tags.amenity=='bar' %}🍸{% elseif tags.amenity=='biergarten'%}🍻{% elseif tags.amenity=='cafe' %}☕{% elseif tags.amenity=='fast_food' %}🍔{% elseif tags.amenity=='ice_cream' %}🍨{% elseif tags.amenity=='pub' %}🍺{% else %}🍴{% endif %}" }, "filter": { + "name": { + "toCheck": [ "name", "operator", "amenity" ], + "name": "tag:name", + "type": "text", + "op": "strsearch" + }, "amenity": { "type": "select", "values": [ From 500d94cd533cec9837870a93280fc94aafe11439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 12 Aug 2018 22:28:44 +0200 Subject: [PATCH 04/14] gastro: filter for 'diet' --- gastro.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gastro.json b/gastro.json index 687824397..badae539a 100644 --- a/gastro.json +++ b/gastro.json @@ -57,6 +57,11 @@ "type": "autocomplete", "values": [ "afghan", "arab", "asian", "australian", "austrian", "barbecue", "burger", "cake", "caribbean", "caribean", "chinese", "coffee", "coffee_shop", "crepe", "empanada", "fish_and_chips", "french", "fried_food", "friture", "greek", "gyros", "ice_cream", "indian", "international", "italian", "japanese", "juice", "kebab", "korean", "local", "mexican", "noodles", "pasta", "pie", "pizza", "regional", "salad", "sandwich", "sausage", "seafood", "soup", "spanish", "steak_house", "sushi", "thai", "turkish", "vegan", "vegetarian", "vietnamese" ], "op": "has" + }, + "diet": { + "type": "autocomplete", + "values": [ "diet:vegan", "diet:vegetarian", "diet:pescetarian", "diet:lacto_vegetarian", "diet:ovo_vegetarian", "diet:fruitarian", "diet:raw", "diet:gluten_free", "diet:dairy_free", "diet:lactose_free", "diet:halal", "diet:kosher" ], + "op": "has_key_value" } } } From e8c487cd86e59fba87ccc5a03068498e6d574ee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 12 Aug 2018 22:29:43 +0200 Subject: [PATCH 05/14] pt: filter for route type --- pt.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pt.json b/pt.json index cfcca14f7..22c8ee2ff 100644 --- a/pt.json +++ b/pt.json @@ -189,5 +189,19 @@ "zoom": 12, "color": "#007fff" } + }, + "filter": { + "route": { + "type": "select", + "values": [ + "aerialway", + "bus", + "ferry", + "subway", + "train", + "tram", + "trolleybus" + ] + } } } From 37ba1c9eeffe355fcb41eb3aa2ab19e3f55ab342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 22 Oct 2018 21:45:41 +0200 Subject: [PATCH 06/14] Gastro: improve filters --- gastro.json | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/gastro.json b/gastro.json index 869a352e2..1ff2c2d06 100644 --- a/gastro.json +++ b/gastro.json @@ -47,13 +47,8 @@ "markerSign": "{% if tags.amenity=='bar' %}🍸{% elseif tags.amenity=='biergarten'%}🍻{% elseif tags.amenity=='cafe' %}☕{% elseif tags.amenity=='fast_food' %}🍔{% elseif tags.amenity=='ice_cream' %}🍨{% elseif tags.amenity=='pub' %}🍺{% else %}🍴{% endif %}" }, "filter": { - "name": { - "toCheck": [ "name", "operator", "amenity" ], - "name": "tag:name", - "type": "text", - "op": "strsearch" - }, "amenity": { + "name": "{{ keyTrans('amenity') }}", "type": "select", "values": [ "bar", @@ -61,18 +56,24 @@ "cafe", "fast_food", "ice_cream", - "pub" + "pub", + "restaurant" ], + "valueName": "{{ tagTrans('amenity', value) }}", "op": "=" }, "cuisine": { - "type": "autocomplete", + "name": "{{ keyTrans('cuisine') }}", + "type": "select", "values": [ "afghan", "arab", "asian", "australian", "austrian", "barbecue", "burger", "cake", "caribbean", "caribean", "chinese", "coffee", "coffee_shop", "crepe", "empanada", "fish_and_chips", "french", "fried_food", "friture", "greek", "gyros", "ice_cream", "indian", "international", "italian", "japanese", "juice", "kebab", "korean", "local", "mexican", "noodles", "pasta", "pie", "pizza", "regional", "salad", "sandwich", "sausage", "seafood", "soup", "spanish", "steak_house", "sushi", "thai", "turkish", "vegan", "vegetarian", "vietnamese" ], + "valueName": "{{ tagTrans('cuisine', value) }}", "op": "has" }, "diet": { - "type": "autocomplete", + "name": "{{ keyTrans('diet') }}", + "type": "select", "values": [ "diet:vegan", "diet:vegetarian", "diet:pescetarian", "diet:lacto_vegetarian", "diet:ovo_vegetarian", "diet:fruitarian", "diet:raw", "diet:gluten_free", "diet:dairy_free", "diet:lactose_free", "diet:halal", "diet:kosher" ], + "valueName": "{{ keyTrans(value) }}", "op": "has_key_value" } } From 0ad6c4aa22f5cbd42734f54173b0f3687f9945c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Wed, 24 Oct 2018 20:31:12 +0200 Subject: [PATCH 07/14] Gastro: split cuisine filter into food/dessert/ethnicity --- gastro.json | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/gastro.json b/gastro.json index 1ff2c2d06..a61b60d55 100644 --- a/gastro.json +++ b/gastro.json @@ -62,10 +62,27 @@ "valueName": "{{ tagTrans('amenity', value) }}", "op": "=" }, - "cuisine": { - "name": "{{ keyTrans('cuisine') }}", + "cuisine_food": { + "name": "{{ keyTrans('cuisine/food') }}", "type": "select", - "values": [ "afghan", "arab", "asian", "australian", "austrian", "barbecue", "burger", "cake", "caribbean", "caribean", "chinese", "coffee", "coffee_shop", "crepe", "empanada", "fish_and_chips", "french", "fried_food", "friture", "greek", "gyros", "ice_cream", "indian", "international", "italian", "japanese", "juice", "kebab", "korean", "local", "mexican", "noodles", "pasta", "pie", "pizza", "regional", "salad", "sandwich", "sausage", "seafood", "soup", "spanish", "steak_house", "sushi", "thai", "turkish", "vegan", "vegetarian", "vietnamese" ], + "key": "cuisine", + "values": [ "barbecue", "burger", "casserole", "chicken", "couscous", "curry", "fish", "fish_and_chips", "fried_food", "friture", "gyros", "kebab", "noodle", "pasta", "pizza", "sandwich", "sausage", "seafood", "soup", "steak_house", "sub", "sushi", "tapas", "wings" ], + "valueName": "{{ tagTrans('cuisine', value) }}", + "op": "has" + }, + "cuisine_dessert": { + "name": "{{ keyTrans('cuisine/dessert') }}", + "type": "select", + "key": "cuisine", + "values": [ "bagel", "biscuit", "bougatsa", "cake", "coffee_shop", "cookie", "crepe", "dessert", "donut", "empanada", "frozen_yogurt", "gingerbread", "ice_cream", "chimney_cake", "langos", "pancake", "pastry", "petit_four", "pie", "pogacha", "poppy_seed_roll", "profiterole", "punch_cake", "savory_pancakes", "strudel", "teahouse", "waffle" ], + "valueName": "{{ tagTrans('cuisine', value) }}", + "op": "has" + }, + "cuisine_ethnicity": { + "name": "{{ keyTrans('cuisine/ethnicity') }}", + "type": "select", + "key": "cuisine", + "values": [ "afghan", "african", "american", "arab", "argentinian", "asian", "australian", "baiana", "balkan", "basque", "bavarian", "belarusan", "bolivian", "brazilian", "cantonese", "capixaba", "caribbean", "chinese", "croatian", "czech", "danish", "french", "gaucho", "german", "greek", "hawaiian", "hunan", "hungarian", "indian", "international", "iranian", "italian", "japanese", "jewish", "korean", "kyo_ryouri", "latin_american", "lebanese", "malagasy", "mediterranean", "mexican", "mineira", "new_mexican", "okinawa_ryori", "pakistani", "peruvian", "polish", "portuguese", "regional", "rhenish", "russian", "shandong", "sichuan", "spanish", "texan", "tex-mex", "thai", "turkish", "vietnamese", "westphalian" ], "valueName": "{{ tagTrans('cuisine', value) }}", "op": "has" }, From 72607923ce59c1b98247dacf532796e652669942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Wed, 24 Oct 2018 20:36:51 +0200 Subject: [PATCH 08/14] Split memorial from historic --- culture_religion.json | 3 ++ historic.json | 34 ++++++---------------- memorial.json | 65 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 26 deletions(-) create mode 100644 memorial.json diff --git a/culture_religion.json b/culture_religion.json index 2d68d9271..52cc1a5aa 100644 --- a/culture_religion.json +++ b/culture_religion.json @@ -28,6 +28,9 @@ { "id": "historic" }, + { + "id": "memorial" + }, { "id": "religion" }, diff --git a/historic.json b/historic.json index 8ab235da2..dab36a187 100644 --- a/historic.json +++ b/historic.json @@ -22,28 +22,22 @@ "query": { "11": [ "(", - "node[historic~\"^(castle|archaeological_site|battlefield|monument)$\"];", - "way[historic~\"^(castle|archaeological_site|battlefield|monument)$\"];", - "relation[historic~\"^(castle|archaeological_site|battlefield|monument)$\"];", + "node[historic~\"^(castle|archaeological_site|battlefield)$\"];", + "way[historic~\"^(castle|archaeological_site|battlefield)$\"];", + "relation[historic~\"^(castle|archaeological_site|battlefield)$\"];", ")" ], "14": [ "(", - "node[historic];", - "way[historic];", - "relation[historic];", + "node[historic][historic!~\"^(memorial|monument)$\"];", + "way[historic][historic!~\"^(memorial|monument)$\"];", + "relation[historic][historic!~\"^(memorial|monument)$\"];", ")" ] }, "feature": { - "pre": [ - "{% set value = tags.historic %}", - "{% if const[tags.historic ~ ' memorial=' ~ tags.memorial] %}", - " {% set value = tags.historic ~ ' memorial=' ~ tags.memorial %}", - "{% endif %}" - ], - "description": "{{ tagTransList('historic', value) }}", - "markerSign": "{{ const[value].sign|raw }}" + "description": "{{ tagTransList('historic', tags.historic) }}", + "markerSign": "{{ const[tags.historic].sign|raw }}" }, "info": [ "", @@ -79,18 +73,6 @@ "aircraft": { "sign": "", "zoom": 14 - }, - "memorial": { - "sign": "", - "zoom": 14 - }, - "memorial memorial=plaque": { - "sign": "", - "zoom": 14 - }, - "monument": { - "sign": "", - "zoom": 11 } } } diff --git a/memorial.json b/memorial.json new file mode 100644 index 000000000..666c93a5e --- /dev/null +++ b/memorial.json @@ -0,0 +1,65 @@ +{ + "type": "overpass", + "name": { + "de": "Denkmäler", + "en": "Memorials" + }, + "query": { + "11": [ + "(", + "node[historic~\"^(monument)$\"];", + "way[historic~\"^(monument)$\"];", + "relation[historic~\"^(monument)$\"];", + ")" + ], + "14": [ + "(", + "node[historic~\"^(memorial|monument)$\"];", + "way[historic~\"^(memorial|monument)$\"];", + "relation[historic~\"^(memorial|monument)$\"];", + ")" + ] + }, + "feature": { + "pre": [ + "{% set value = tags.historic %}", + "{% if const[tags.historic ~ ' memorial=' ~ tags.memorial] %}", + " {% set value = tags.historic ~ ' memorial=' ~ tags.memorial %}", + "{% endif %}" + ], + "description": "{{ tagTransList('historic', value) }}", + "markerSign": "{{ const[value].sign|raw }}" + }, + "info": [ + "
", + "{% for value, data in const %}", + "{% if data.zoom <= map.zoom %}", + " ", + " ", + " ", + " ", + "{% endif %}", + "{% endfor %}", + "{% if 14 <= map.zoom %}", + " ", + " ", + " ", + " ", + "{% endif %}", + "
{{ markerCircle({})|raw }}
{{ data.sign|raw }}
{{ tagTrans('historic', value) }}
{{ markerCircle({})|raw }}
{{ trans('other') }}
" + ], + "const": { + "memorial": { + "sign": "", + "zoom": 14 + }, + "memorial memorial=plaque": { + "sign": "", + "zoom": 14 + }, + "monument": { + "sign": "", + "zoom": 11 + } + } +} From e182ab7a0bb3991e613c3a5b9338e0f43fdcd5eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Wed, 24 Oct 2018 21:29:12 +0200 Subject: [PATCH 09/14] Memorial: use "historic=memorial memorial=*" (or alias memorial:type=*) as description --- memorial.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/memorial.json b/memorial.json index 666c93a5e..117785c57 100644 --- a/memorial.json +++ b/memorial.json @@ -23,8 +23,10 @@ "feature": { "pre": [ "{% set value = tags.historic %}", - "{% if const[tags.historic ~ ' memorial=' ~ tags.memorial] %}", + "{% if tags.historic == 'memorial' and tags.memorial %}", " {% set value = tags.historic ~ ' memorial=' ~ tags.memorial %}", + "{% elseif tags.historic == 'memorial' and attribute(tags, 'memorial:type') %}", + " {% set value = tags.historic ~ ' memorial=' ~ attribute(tags, 'memorial:type') %}", "{% endif %}" ], "description": "{{ tagTransList('historic', value) }}", From 653a8587e7d5a5bfeb3658ab0da1ae472a82a64d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Wed, 24 Oct 2018 22:16:58 +0200 Subject: [PATCH 10/14] memorial: start writing filters --- memorial.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/memorial.json b/memorial.json index 117785c57..30cc08ce7 100644 --- a/memorial.json +++ b/memorial.json @@ -63,5 +63,25 @@ "sign": "", "zoom": 11 } + }, + "filter": { + "type": { + "name": "Type", + "type": "select", + "values": { + "monument": { + "name": "{{ tagTrans('historic', 'monument') }}", + "query": "nwr[historic=monument]" + }, + "memorial": { + "name": "{{ tagTrans('historic', 'memorial') }}", + "query": "nwr[historic=memorial]" + }, + "stolperstein": { + "name": "{{ tagTrans('historic', 'memorial memorial=stolperstein') }}", + "query": "(nwr[memorial=stolperstein];nwr[\"memorial:type\"=stolperstein];)" + } + } + } } } From 6c6b34dc53d602d8394fa354dc8c90e7df802ac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Wed, 9 Jan 2019 21:37:23 +0100 Subject: [PATCH 11/14] gastro: improve diet filter --- gastro.json | 20 +++++++++++++++++++- lang/de.json | 3 ++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/gastro.json b/gastro.json index a61b60d55..83d645bcc 100644 --- a/gastro.json +++ b/gastro.json @@ -46,6 +46,7 @@ ], "markerSign": "{% if tags.amenity=='bar' %}🍸{% elseif tags.amenity=='biergarten'%}🍻{% elseif tags.amenity=='cafe' %}☕{% elseif tags.amenity=='fast_food' %}🍔{% elseif tags.amenity=='ice_cream' %}🍨{% elseif tags.amenity=='pub' %}🍺{% else %}🍴{% endif %}" }, + "info": "{{ repoTrans('Objects with diet information') }}", "filter": { "amenity": { "name": "{{ keyTrans('amenity') }}", @@ -89,7 +90,24 @@ "diet": { "name": "{{ keyTrans('diet') }}", "type": "select", - "values": [ "diet:vegan", "diet:vegetarian", "diet:pescetarian", "diet:lacto_vegetarian", "diet:ovo_vegetarian", "diet:fruitarian", "diet:raw", "diet:gluten_free", "diet:dairy_free", "diet:lactose_free", "diet:halal", "diet:kosher" ], + "values": { + "*": { + "name": "{{ repoTrans('Objects with diet information') }}", + "query": "nwr[~\"^diet:\"~\".\"]" + }, + "diet:vegan": {}, + "diet:vegetarian": {}, + "diet:pescetarian": {}, + "diet:lacto_vegetarian": {}, + "diet:ovo_vegetarian": {}, + "diet:fruitarian": {}, + "diet:raw": {}, + "diet:gluten_free": {}, + "diet:dairy_free": {}, + "diet:lactose_free": {}, + "diet:halal": {}, + "diet:kosher": {} + }, "valueName": "{{ keyTrans(value) }}", "op": "has_key_value" } diff --git a/lang/de.json b/lang/de.json index 64e096f93..48e550a94 100644 --- a/lang/de.json +++ b/lang/de.json @@ -68,5 +68,6 @@ "category:waste": "Entsorgung", "category:water": "Gewässer", "category:wikipedia": "Wikipedia", - "category:works": "Fabriken" + "category:works": "Fabriken", + "Objects with diet information": "Objekte mit Ernährungsinformationen" } From 6b21617d2748017ead7ca7171b84cd7a613273cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 20 Jan 2019 22:32:19 +0100 Subject: [PATCH 12/14] More filters --- culture.json | 11 ++++++++++- emergency.json | 28 ++++++++++++++++++++++++++++ historic.json | 45 +++++++++++++++++++++++++++++++++++++++++++++ memorial.json | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 119 insertions(+), 1 deletion(-) diff --git a/culture.json b/culture.json index 630f3751b..219651a2b 100644 --- a/culture.json +++ b/culture.json @@ -121,5 +121,14 @@ " ", "{% endfor %}", "" - ] + ], + "filter": { + "type": { + "name": "Type", + "query": "nwr[{{ value }}]", + "type": "select", + "values": "const", + "valueName": "{{ trans('tag' ~ value) }}" + } + } } diff --git a/emergency.json b/emergency.json index 73b606d98..c739352fe 100644 --- a/emergency.json +++ b/emergency.json @@ -96,5 +96,33 @@ "sign": "", "background": "#009262" } + }, + "filter": { + "type": { + "name": "{{ keyTrans('amenity') }}", + "type": "select", + "values": { + "fire_station": { + "name": "{{ tagTrans('amenity', 'fire_station') }}", + "query": "nwr[amenity=fire_station]" + }, + "hospital": { + "name": "{{ tagTrans('amenity', 'hospital') }}", + "query": "nwr[amenity=hospital]" + }, + "police": { + "name": "{{ tagTrans('amenity', 'police') }}", + "query": "nwr[amenity=police]" + }, + "emergency_phone": { + "name": "{{ tagTrans('emergency', 'phone') }}", + "query": "node[emergency=phone]" + }, + "emergency_access_point": { + "name": "{{ tagTrans('highway', 'emergency_access_point') }}", + "query": "node[highway=emergency_access_point]" + } + } + } } } diff --git a/historic.json b/historic.json index 0042fc19c..067b740e0 100644 --- a/historic.json +++ b/historic.json @@ -113,5 +113,50 @@ "sign": "", "zoom": 14 } + }, + "filter": { + "type": { + "key": "historic", + "name": "Type", + "type": "select", + "values": "const", + "valueName": "{{ tagTrans('historic', value) }}" + }, + "conflict": { + "key": "memorial:conflict", + "op": "has", + "name": "{{ keyTrans('memorial:conflict') }}", + "type": "select", + "values": [ + "WW1", + "WW2" + ], + "valueName": "{{ tagTrans('memorial:conflict', value) }}" + }, + "civilization": { + "key": "historic:civilization", + "op": "has", + "name": "{{ keyTrans('historic:civilization') }}", + "type": "select", + "values": [ + "ancient_egyptian", + "ancient_greek", + "ancient_roman", + "byzantine", + "celtic", + "etruscan", + "imperial_chinese", + "korean", + "medieval", + "modern", + "neolithic", + "nuragic", + "ottoman", + "prehistoric", + "roman", + "western_roman" + ], + "valueName": "{{ tagTrans('historic:civilization', value) }}" + } } } diff --git a/memorial.json b/memorial.json index 0580731ee..c2c49080c 100644 --- a/memorial.json +++ b/memorial.json @@ -125,6 +125,42 @@ "query": "(nwr[memorial=stolperstein];nwr[\"memorial:type\"=stolperstein];)" } } + }, + "conflict": { + "key": "memorial:conflict", + "op": "has", + "name": "{{ keyTrans('memorial:conflict') }}", + "type": "select", + "values": [ + "WW1", + "WW2" + ], + "valueName": "{{ tagTrans('memorial:conflict', value) }}" + }, + "civilization": { + "key": "historic:civilization", + "op": "has", + "name": "{{ keyTrans('historic:civilization') }}", + "type": "select", + "values": [ + "ancient_egyptian", + "ancient_greek", + "ancient_roman", + "byzantine", + "celtic", + "etruscan", + "imperial_chinese", + "korean", + "medieval", + "modern", + "neolithic", + "nuragic", + "ottoman", + "prehistoric", + "roman", + "western_roman" + ], + "valueName": "{{ tagTrans('historic:civilization', value) }}" } } } From b2b89b5be384e933fea99890e558f9193b91e505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 24 Jan 2019 08:00:03 +0100 Subject: [PATCH 13/14] culture: filter values as twig template --- culture.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/culture.json b/culture.json index 219651a2b..39eea203e 100644 --- a/culture.json +++ b/culture.json @@ -127,8 +127,8 @@ "name": "Type", "query": "nwr[{{ value }}]", "type": "select", - "values": "const", - "valueName": "{{ trans('tag' ~ value) }}" + "values": "{% for k, v in const %}{% endfor %}", + "valueName": "{{ trans('tag:' ~ value) }}" } } } From 41963c0658b59c963ff8fd247c5439cedc4e3ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 31 Jan 2019 10:25:01 +0100 Subject: [PATCH 14/14] Specify many filters --- children.json | 38 ++++++++++++++++- communication.json | 8 ++++ craft.json | 8 ++++ culture.json | 3 +- education.json | 8 ++++ emergency.json | 3 +- financial.json | 8 ++++ gastro.json | 3 +- health.json | 8 ++++ historic.json | 5 ++- law.json | 8 ++++ memorial.json | 2 +- office.json | 8 ++++ organisations.json | 8 ++++ places.json | 9 ++++ public.json | 8 ++++ religion.json | 92 ++++++++++++++++++++++++++++++++++++---- shop.json | 9 ++++ sport.json | 8 ++++ swimming_bathing.json | 8 ++++ tourism_attractions.json | 11 +++++ tourism_services.json | 8 ++++ 22 files changed, 255 insertions(+), 16 deletions(-) diff --git a/children.json b/children.json index 69fc9134b..660515f32 100644 --- a/children.json +++ b/children.json @@ -81,5 +81,41 @@ " {{ tagTrans('amenity', 'toilets diaper=yes') }}", " ", "" - ] + ], + "filter": { + "type": { + "name": "{{ trans('filter:type') }}", + "type": "select", + "values": { + "playground": { + "name": "{{ tagTrans('leisure', 'playground') }}", + "query": "nwr[leisure=playground]" + }, + "indoor_play": { + "name": "{{ tagTrans('leisure', 'indoor_play') }}", + "query": "nwr[leisure=indoor_play]" + }, + "summer_camp": { + "name": "{{ tagTrans('leisure', 'summer_camp') }}", + "query": "nwr[leisure=summer_camp]" + }, + "kids_area": { + "name": "{{ keyTrans('kids_area') }}", + "query": "nwr[kids_area]" + }, + "shop_baby_goods": { + "name": "{{ tagTrans('shop', 'baby_goods') }}", + "query": "nwr[shop=baby_goods]" + }, + "shop_toys": { + "name": "{{ tagTrans('shop', 'toys') }}", + "query": "nwr[shop=toys]" + }, + "toilets": { + "name": "{{ tagTrans('amenities', 'toilets diaper=yes') }}", + "query": "nwr[amenity=toilets][diaper]" + } + } + } + } } diff --git a/communication.json b/communication.json index 83a90d31e..3053b3e83 100644 --- a/communication.json +++ b/communication.json @@ -130,5 +130,13 @@ "sign": "", "zoom": 16 } + }, + "filter": { + "type": { + "name": "{{ trans('filter:type') }}", + "show_default": "true", + "type": "select", + "values": "{% for k, v in const %}{% endfor %}" + } } } diff --git a/craft.json b/craft.json index f9c49d4a1..af1656938 100644 --- a/craft.json +++ b/craft.json @@ -73,5 +73,13 @@ "window_construction": "", "winery": "🍷" } + }, + "filter": { + "craft": { + "name": "{{ trans('filter:type') }}", + "type": "select", + "show_default": "true", + "values": "{% set list = [] %}{% for t, v in const.crafts %}{% endfor %}" + } } } diff --git a/culture.json b/culture.json index 39eea203e..226b774b8 100644 --- a/culture.json +++ b/culture.json @@ -124,7 +124,8 @@ ], "filter": { "type": { - "name": "Type", + "name": "{{ trans('filter:type') }}", + "show_default": "true", "query": "nwr[{{ value }}]", "type": "select", "values": "{% for k, v in const %}{% endfor %}", diff --git a/education.json b/education.json index 5b4772da6..ba2fc70b8 100644 --- a/education.json +++ b/education.json @@ -129,5 +129,13 @@ "sign": "", "zoom": 14 } + }, + "filter": { + "type": { + "name": "{{ trans('filter:type') }}", + "show_default": "true", + "type": "select", + "values": "{% for k, v in const %}{% endfor %}" + } } } diff --git a/emergency.json b/emergency.json index c739352fe..361337c07 100644 --- a/emergency.json +++ b/emergency.json @@ -99,8 +99,9 @@ }, "filter": { "type": { - "name": "{{ keyTrans('amenity') }}", + "name": "{{ trans('filter:type') }}", "type": "select", + "show_default": "true", "values": { "fire_station": { "name": "{{ tagTrans('amenity', 'fire_station') }}", diff --git a/financial.json b/financial.json index 82b3bfbd5..9dce9800c 100644 --- a/financial.json +++ b/financial.json @@ -101,5 +101,13 @@ "sign": "", "zoom": 15 } + }, + "filter": { + "type": { + "name": "{{ trans('filter:type') }}", + "show_default": "true", + "type": "select", + "values": "{% for k, v in const %}{% endfor %}" + } } } diff --git a/gastro.json b/gastro.json index 83d645bcc..d26740af4 100644 --- a/gastro.json +++ b/gastro.json @@ -49,8 +49,9 @@ "info": "{{ repoTrans('Objects with diet information') }}", "filter": { "amenity": { - "name": "{{ keyTrans('amenity') }}", + "name": "{{ trans('filter:type') }}", "type": "select", + "show_default": "true", "values": [ "bar", "biergarten", diff --git a/health.json b/health.json index a54078285..8c7c3ddcc 100644 --- a/health.json +++ b/health.json @@ -88,5 +88,13 @@ "amenity=pharmacy": "", "amenity=social_facility": "", "amenity=veterinary": "" + }, + "filter": { + "type": { + "name": "{{ trans('filter:type') }}", + "show_default": "true", + "type": "select", + "values": "{% for k, v in const %}{% endfor %}" + } } } diff --git a/historic.json b/historic.json index 067b740e0..adc3b1b7c 100644 --- a/historic.json +++ b/historic.json @@ -117,9 +117,10 @@ "filter": { "type": { "key": "historic", - "name": "Type", + "show_default": "true", + "name": "{{ trans('filter:type') }}", "type": "select", - "values": "const", + "values": "{% set list = [] %}{% for t, v in const %}{% endfor %}", "valueName": "{{ tagTrans('historic', value) }}" }, "conflict": { diff --git a/law.json b/law.json index f670988c8..a750264fb 100644 --- a/law.json +++ b/law.json @@ -57,5 +57,13 @@ "sign": "", "zoom": 14 } + }, + "filter": { + "type": { + "name": "{{ trans('filter:type') }}", + "show_default": "true", + "type": "select", + "values": "{% for k, v in const %}{% endfor %}" + } } } diff --git a/memorial.json b/memorial.json index c2c49080c..bd5b94270 100644 --- a/memorial.json +++ b/memorial.json @@ -109,7 +109,7 @@ }, "filter": { "type": { - "name": "Type", + "name": "{{ trans('filter:type') }}", "type": "select", "values": { "monument": { diff --git a/office.json b/office.json index b92ba3451..ddefd6e96 100644 --- a/office.json +++ b/office.json @@ -43,5 +43,13 @@ "therapist": "", "travel_agent": "", "publisher": "" + }, + "filter": { + "type": { + "name": "{{ trans('filter:type') }}", + "show_default": "true", + "type": "select", + "values": "{% for k, v in const %}{% endfor %}" + } } } diff --git a/organisations.json b/organisations.json index 1d73ea0c8..f8ae35890 100644 --- a/organisations.json +++ b/organisations.json @@ -78,5 +78,13 @@ "sign": "", "zoom": 13 } + }, + "filter": { + "type": { + "name": "{{ trans('filter:type') }}", + "show_default": "true", + "type": "select", + "values": "{% for k, v in const %}{% endfor %}" + } } } diff --git a/places.json b/places.json index 2ca3d0194..29d554bda 100644 --- a/places.json +++ b/places.json @@ -34,5 +34,14 @@ "description": "{{ tagTrans('place', tags.place) }}", "body": "{% if tags.population %}{{ keyTrans('population') }}: {{ tags.population }}{% endif %}", "priority": "{% set priorities = { 'continent': 0, 'country': 1, 'state': 2, 'region': 3, 'city': 4, 'town': 5, 'village': 6, 'suburb': 7, 'hamlet': 8, 'quarter': 9, neighbourhood: 10, 'isolated_dwelling': 11, 'farm': 12 } %}{{ priorities[tags.place] }}" + }, + "filter": { + "name": { + "key": [ "name", "name:*" ], + "name": "{{ keyTrans('name') }}", + "type": "text", + "change_on": "keyup", + "op": "strsearch" + } } } diff --git a/public.json b/public.json index 448fb3102..3c95f11e2 100644 --- a/public.json +++ b/public.json @@ -89,5 +89,13 @@ "amenity=townhall": "", "office=administration": "", "office=government": "" + }, + "filter": { + "type": { + "name": "{{ trans('filter:type') }}", + "show_default": "true", + "type": "select", + "values": "{% for k, v in const %}{% endfor %}" + } } } diff --git a/religion.json b/religion.json index b3e2c5ac4..7e3c5aa72 100644 --- a/religion.json +++ b/religion.json @@ -83,14 +83,88 @@ " {{ keyTrans('denomination') }}: {{ tagTransList('denomination', tags.denomination) }}
", "{% endif %}" ], - "markerSign": [ - "{% if tags.religion == 'christian' %}✝", - "{% elseif tags.religion == 'muslim' %}☪", - "{% elseif tags.religion == 'buddhist' %}☸", - "{% elseif tags.religion == 'hindu' %}ॐ", - "{% elseif tags.religion == 'jewish' %}✡", - "{% elseif tags.religion == 'pagan' %}☆", - "{% endif %}" - ] + "markerSign": "{{ const.religion[tags.religion] }}" + }, + "const": { + "religion": { + "christian": "✝", + "muslim": "☪", + "buddhist": "☸", + "shinto": "", + "hindu": "ॐ", + "jewish": "✡", + "taoist": "", + "sikh": "", + "none": "", + "multifaith": "", + "unitarian_universialist": "", + "spiritualist": "", + "jain": "", + "voodoo": "", + "confucian": "", + "bahai": "", + "caodaism": "", + "tenrikyo": "", + "vietnamese_folk": "", + "pagan": "☆", + "scientologist": "", + "zoroastrian": "", + "pentecostal": "", + "shamanic": "" + } + }, + "filter": { + "type": { + "name": "{{ trans('filter:type') }}", + "show_default": "true", + "query": "nwr[{{ value }}]", + "type": "select", + "values": { + "place_of_worship": { + "name": "{{ tagTrans('amenity', 'place_of_worship') }}", + "query": "nwr[amenity=place_of_worship]" + }, + "grave_yard": { + "name": "{{ tagTrans('amenity', 'grave_yard') }}", + "query": "nwr[amenity=grave_yard]" + }, + "crematorium": { + "name": "{{ tagTrans('amenity', 'crematorium') }}", + "query": "nwr[amenity=crematorium]" + }, + "cemetery": { + "name": "{{ tagTrans('landuse', 'cemetery') }}", + "query": "nwr[landuse=cemetery]" + }, + "wayside_cross": { + "name": "{{ tagTrans('historic', 'wayside_cross') }}", + "query": "nwr[historic=wayside_cross]" + }, + "wayside_shrine": { + "name": "{{ tagTrans('historic', 'wayside_shrine') }}", + "query": "nwr[historic=wayside_shrine]" + }, + "wayside_chapel": { + "name": "{{ tagTrans('historic', 'wayside_chapel') }}", + "query": "nwr[historic=wayside_chapel]" + }, + "parish": { + "name": "{{ tagTrans('office', 'parish') }}", + "query": "nwr[office=parish]" + }, + "office": { + "name": "{{ tagTrans('office', 'religion') }}", + "query": "nwr[office=religion]" + } + } + }, + "religion": { + "name": "{{ keyTrans('religion') }}", + "show_default": "true", + "type": "select", + "valueName": "{{ tagTrans('religion', value) }}", + "values": "{% set list = [] %}{% for t, v in const.religion %}{% endfor %}", + "op": "has" + } } } diff --git a/shop.json b/shop.json index ce8c8cb4d..0c94727a0 100644 --- a/shop.json +++ b/shop.json @@ -150,5 +150,14 @@ "sign": "⌚" } ] + }, + "filter": { + "shop": { + "name": "{{ trans('filter:type') }}", + "type": "select", + "show_default": "true", + "values": "{% set list = [] %}{% for k, v in const.shops %}{% for t in v.types %}{% endfor %}{% endfor %}", + "op": "has" + } } } diff --git a/sport.json b/sport.json index 2caadbc26..3b7931bd4 100644 --- a/sport.json +++ b/sport.json @@ -68,5 +68,13 @@ "tennis": "🎾", "volleyball": "🏐", "weightlifting": "🏋" + }, + "filter": { + "sport": { + "name": "{{ keyTrans('sport') }}", + "type": "select", + "show_default": "true", + "values": "{% set list = [] %}{% for t, v in const %}{% endfor %}" + } } } diff --git a/swimming_bathing.json b/swimming_bathing.json index def3505f6..98e8aee6d 100644 --- a/swimming_bathing.json +++ b/swimming_bathing.json @@ -139,5 +139,13 @@ "zoom": 16, "sign": "🚿 " } + }, + "filter": { + "type": { + "name": "{{ trans('filter:type') }}", + "type": "select", + "show_default": "true", + "values": "{% for k, v in const %}{% endfor %}" + } } } diff --git a/tourism_attractions.json b/tourism_attractions.json index d69b2b457..8f22154b8 100644 --- a/tourism_attractions.json +++ b/tourism_attractions.json @@ -56,5 +56,16 @@ "theme_park": "", "viewpoint": "", "zoo": "🦁" + }, + "filter": { + "type": { + "name": "{{ trans('filter:type') }}", + "show_default": "true", + "query": "nwr[{{ value }}]", + "type": "select", + "key": "tourism", + "values": "{% set list = [] %}{% for t, v in const %}{% endfor %}", + "op": "has" + } } } diff --git a/tourism_services.json b/tourism_services.json index 4901f18a0..57b77d2f7 100644 --- a/tourism_services.json +++ b/tourism_services.json @@ -141,5 +141,13 @@ "sign": "ℹ️", "zoom": 16 } + }, + "filter": { + "type": { + "name": "{{ trans('filter:type') }}", + "show_default": "true", + "type": "select", + "values": "{% for k, v in const %}{% endfor %}" + } } }