From 351ed43458b285132ff75fc0eec0dd0eebd7c491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sat, 14 Nov 2020 18:55:15 +0100 Subject: [PATCH] natural: include place=island (z>=9) and place=islet (z>=13) --- natural.json | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/natural.json b/natural.json index 53749c3..990d263 100644 --- a/natural.json +++ b/natural.json @@ -20,36 +20,49 @@ "9": [ "(", "node[natural~\"^(peak|volcano|valley)$\"];", + "nwr[place~\"^(island)$\"];", ")" ], "13": [ "(", "nwr[natural~\"^(peak|volcano|wood|glacier|cape|peninsula|beach|coastline|reef|hill|valley|ridge|arete|saddle|sinkhole|cave_entrance|isthmus)$\"];", + "nwr[place~\"^(island|islet)$\"];", ")" ], "16": [ "(", "nwr[natural][natural!~\"^(water|divide|bay|strait|spring|hot_spring|geyser|tree)$\"];", + "nwr[place~\"^(island|islet)$\"];", ")" ], "18": [ "(", "nwr[natural][natural!~\"^(water|divide|bay|strait|spring|hot_spring|geyser)$\"];", + "nwr[place~\"^(island|islet)$\"];", ")" ] }, "feature": { + "pre": [ + "{% if tags.place in [ 'island', 'islet' ] %}", + "{% set key = 'place' %}", + "{% set value = tags.place %}", + "{% else %}", + "{% set key = 'natural' %}", + "{% set value = tags.natural %}", + "{% endif %}" + ], "title": [ "{{ localizedTag(tags, 'name') | default(trans('unnamed')) }}", "{% if tags.natural == 'peak' and tags.ele %}({{ tags.ele }}m){% endif %}" ], - "description": "{{ tagTrans('natural', tags.natural) }}", + "description": "{{ tagTrans(key, value) }}", "style": { - "color": "{{ const[tags.natural].color|default('#f2756a') }}" + "color": "{{ const[value].color|default('#f2756a') }}" }, - "markerSign": "{{ const[tags.natural].sign|raw }}", - "markerSymbol": "{{ markerPointer({ fillColor: const[tags.natural].color|default('#f2756a') })|raw }}", - "listMarkerSymbol": "{{ markerCircle({ fillColor: const[tags.natural].color|default('#f2756a') })|raw }}" + "markerSign": "{{ const[value].sign|raw }}", + "markerSymbol": "{{ markerPointer({ fillColor: const[value].color|default('#f2756a') })|raw }}", + "listMarkerSymbol": "{{ markerCircle({ fillColor: const[value].color|default('#f2756a') })|raw }}" }, "filter": { "type": { @@ -57,12 +70,26 @@ "key": "natural", "type": "select", "show_default": "true", - "values": "{% set list = [] %}{% for k, v in const %}{% endfor %}", + "values": "{% set list = [] %}{% for k, v in const %}{% endfor %}", "sort": "natsort", "op": "has" } }, "const": { + "island": { + "zoom": 9, + "sign": "", + "color": "#cfb997", + "key": "place", + "group": "landform" + }, + "islet": { + "zoom": 13, + "sign": "", + "color": "#cfb997", + "key": "place", + "group": "landform" + }, "wood": { "zoom": 13, "sign": "",