diff --git a/natural.json b/natural.json index 53749c3d..990d2634 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": "",