From 4662e01bf4779e9a72fec2cd2a84ee5acb15c0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 29 Nov 2018 18:53:46 +0100 Subject: [PATCH] education: include office=educational_institution and =research --- education.json | 51 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/education.json b/education.json index c366e82f..5b4772da 100644 --- a/education.json +++ b/education.json @@ -32,6 +32,7 @@ "node[amenity~'^(college|university|library|school|kindergarten|language_school)$'];", "way[amenity~'^(college|university|library|school|kindergarten|language_school)$'];", "relation[amenity~'^(college|university|library|school|kindergarten|language_school)$'];", + "nwr[office~\"^(educational_institution|research)$\"];", ")" ], "16": [ @@ -39,20 +40,30 @@ "node[amenity~'^(college|university|library|school|kindergarten|public_bookcase)$'];", "way[amenity~'^(college|university|library|school|kindergarten|public_bookcase)$'];", "relation[amenity~'^(college|university|library|school|kindergarten|public_bookcase)$'];", + "nwr[office~\"^(educational_institution|research)$\"];", ")" ] }, "feature": { - "description": "{{ tagTrans('amenity', tags.amenity) }}", + "pre": [ + "{% if tags.office == 'educational_institution' or tags.office == 'research' %}", + " {% set key = 'office' %}", + " {% set value = tags.office %}", + "{% else %}", + " {% set key = 'amenity' %}", + " {% set value = tags.amenity %}", + "{% endif %}" + ], + "description": "{{ tagTrans(key, value) }}", "body": "{% if tags.operator %}{{ keyTrans('operator') }}: {{ tags.operator }}
{% endif %}", "markerSign": [ - "{% set data = const[tags.amenity] %}", + "{% set data = const[key ~ '=' ~ value] %}", "{% if data %}", - "{{ data.sign }}", + "{{ data.sign|raw }}", "{% endif %}" ], "priority": [ - "{% set data = const[tags.amenity] %}", + "{% set data = const[key ~ '=' ~ value] %}", "{% if data %}", "{{ data.priority }}", "{% endif %}" @@ -60,51 +71,63 @@ }, "info": [ "", - "{% for value, data in const %}", + "{% for kv, data in const %}", "{% if data.zoom <= map.zoom %}", " ", - " ", - " ", + " ", + " ", " ", "{% endif %}", "{% endfor %}", "
{{ markerCircle({})|raw }}
{{ data.sign }}
{{ tagTrans('amenity', value) }}{{ markerCircle({})|raw }}
{{ data.sign|raw }}
", + " {{ tagTrans(kv|split('=')[0], kv|split('=')[1]) }}", + "
" ], "const": { - "university": { + "amenity=university": { "priority": 0, "sign": "🎓", "zoom": 11 }, - "college": { + "amenity=college": { "priority": 1, "sign": "🎓", "zoom": 11 }, - "library": { + "amenity=library": { "priority": 2, "sign": "🕮", "zoom": 11 }, - "school": { + "amenity=school": { "priority": 3, "sign": "🏫", "zoom": 14 }, - "language_school": { + "amenity=language_school": { "priority": 3, "sign": "🏫", "zoom": 14 }, - "kindergarten": { + "amenity=kindergarten": { "priority": 4, "sign": "⛹", "zoom": 14 }, - "public_bookcase": { + "amenity=public_bookcase": { "priority": 5, "sign": "📚", "zoom": 16 + }, + "office=educational_institution": { + "priority": 3, + "sign": "🏢", + "zoom": 14 + }, + "office=research": { + "priority": 3, + "sign": "", + "zoom": 14 } } }