From 2950232282ac0ef4b621673b91d9b03b3124d233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Tue, 12 Feb 2019 20:53:00 +0100 Subject: [PATCH] administrative: unfin improvements - use members --- administrative.json | 62 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 5 deletions(-) diff --git a/administrative.json b/administrative.json index 8ca7688f8..307bfcf76 100644 --- a/administrative.json +++ b/administrative.json @@ -29,33 +29,85 @@ "relation[admin_level~\"^(2|3)$\"];", ")" ], - "11": [ + "9": [ "(", "way[admin_level~\"^(2|3|4|5)$\"];", "relation[admin_level~\"^(2|3|4|5)$\"];", ")" ], - "13": [ + "11": [ "(", "way[admin_level~\"^(2|3|4|5|6|7)$\"];", "relation[admin_level~\"^(2|3|4|5|6|7)$\"];", ")" ], - "15": [ + "13": [ "(", "way[admin_level~\"^(2|3|4|5|6|7|8|9)$\"];", "relation[admin_level~\"^(2|3|4|5|6|7|8|9)$\"];", ")" ], - "16": [ + "15": [ "(", "way[admin_level~\"^(2|3|4|5|6|7|8|9|10|11)$\"];", "relation[admin_level~\"^(2|3|4|5|6|7|8|9|10|11)$\"];", ")" ] }, + "members": true, "feature": { "description": "{{ tagTrans('admin_level', tags.admin_level) }}", - "body": "{{ keyTrans('admin_level') }}: {{ tags.admin_level }}" + "body": "{{ keyTrans('admin_level') }}: {{ tags.admin_level }}", + "styles": "", + "markerSymbol": "" + }, + "memberFeature": { + "pre": [ + "{% set level = 99 %}", + "{% for master in masters %}", + " {% if master.tags.admin_level < level %}", + " {% set level = master.tags.admin_level %}", + " {% endif %}", + "{% endfor %}", + "{% set style = const[level] %}" + ], + "style": { + "width": "{{ style.width }}", + "dashArray": "{{ style.dashArray }}", + "color": "#7f007f" + }, + "style:hover": { + "pane": "hover", + "width": "4", + "color": "black" + }, + "markerSymbol": "", + "listExclude": "true" + }, + "const": { + "2": { + "width": "6", + "dashArray": "" + }, + "4": { + "width": "4", + "dashArray": "10,5" + }, + "6": { + "width": "3", + "dashArray": "5,5" + }, + "8": { + "width": "2", + "dashArray": "5,5" + }, + "9": { + "width": "1.5", + "dashArray": "5,5" + }, + "10": { + "width": "1.5", + "dashArray": "2,5" + } } }