From 78c9224c748975d371ef5e36ec695d6936dded13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 25 Mar 2019 12:20:44 +0100 Subject: [PATCH 01/11] natural: add all values from wiki; improve style w/ some icons & colors --- natural.json | 188 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 187 insertions(+), 1 deletion(-) diff --git a/natural.json b/natural.json index 1e2d84c..457d371 100644 --- a/natural.json +++ b/natural.json @@ -42,6 +42,192 @@ "{{ localizedTag(tags, 'name') | default(trans('unnamed')) }}", "{% if tags.natural == 'peak' and tags.ele %}({{ tags.ele }}m){% endif %}" ], - "description": "{{ tagTrans('natural', tags.natural) }}" + "description": "{{ tagTrans('natural', tags.natural) }}", + "style": { + "color": "{{ const[tags.natural].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 }}" + }, + "const": { + "wood": { + "sign": "", + "color": "darkgreen", + "group": "vegetation" + }, + "tree_row": { + "sign": "", + "color": "darkgreen", + "group": "vegetation" + }, + "tree": { + "sign": "", + "color": "darkgreen", + "group": "vegetation" + }, + "scrub": { + "sign": "", + "color": "green", + "group": "vegetation" + }, + "heath": { + "sign": "", + "color": "green", + "group": "vegetation" + }, + "moor": { + "sign": "", + "color": "#8aba50", + "group": "vegetation" + }, + "grassland": { + "sign": "", + "color": "#00dd24", + "group": "vegetation" + }, + "fell": { + "sign": "", + "color": "#49ba91", + "group": "vegetation" + }, + "bare_rock": { + "sign": "", + "color": "#6f6f6f", + "group": "vegetation" + }, + "scree": { + "sign": "", + "color": "#6f6f6f", + "group": "vegetation" + }, + "shingle": { + "sign": "", + "color": "#6f6f6f", + "group": "vegetation" + }, + "sand": { + "sign": "", + "color": "#f9d199", + "group": "vegetation" + }, + "mud": { + "sign": "", + "color": "#988b00", + "group": "vegetation" + }, + "water": { + "sign": "", + "color": "blue", + "group": "water" + }, + "wetland": { + "sign": "", + "color": "#00baff", + "group": "water" + }, + "glacier": { + "sign": "", + "color": "white", + "group": "water" + }, + "bay": { + "sign": "", + "group": "water" + }, + "cape": { + "sign": "", + "group": "water" + }, + "peninsula": { + "sign": "", + "group": "water" + }, + "strait": { + "sign": "", + "group": "water" + }, + "beach": { + "sign": "", + "color": "#f9d199", + "group": "water" + }, + "coastline": { + "sign": "", + "group": "water" + }, + "spring": { + "sign": "", + "group": "water" + }, + "hot_spring": { + "sign": "", + "group": "water" + }, + "geyser": { + "sign": "", + "group": "water" + }, + "reef": { + "sign": "", + "group": "water" + }, + "peak": { + "sign": "", + "color": "#4f4f4f", + "group": "landform" + }, + "hill": { + "sign": "", + "group": "landform" + }, + "volcano": { + "sign": "", + "group": "landform" + }, + "valley": { + "sign": "", + "group": "landform" + }, + "river_terrace": { + "sign": "", + "group": "landform" + }, + "ridge": { + "sign": "", + "group": "landform" + }, + "arete": { + "sign": "", + "group": "landform" + }, + "cliff": { + "sign": "", + "color": "#4f4f4f", + "group": "landform" + }, + "saddle": { + "sign": "", + "color": "#4f4f4f", + "group": "landform" + }, + "rock": { + "sign": "", + "color": "#4f4f4f", + "group": "landform" + }, + "stone": { + "sign": "", + "color": "#4f4f4f", + "group": "landform" + }, + "sinkhole": { + "sign": "", + "group": "landform" + }, + "cave_entrance": { + "sign": "", + "group": "landform" + } } } From f53c9e9609c70638a745a6cdacdc8bfe557b16eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 25 Mar 2019 13:55:16 +0100 Subject: [PATCH 02/11] natural: exclude natural=water (see category water instead) --- natural.json | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/natural.json b/natural.json index 457d371..7399392 100644 --- a/natural.json +++ b/natural.json @@ -24,16 +24,16 @@ ], "13": [ "(", - "node[natural~\"^(peak|volcano|wood|scrub|heath|grassland|fell|bare_rock|scree|shingle|sand|mud|water|wetland|glacier|bay|cape|beach|coastline|spring|hot_spring|geyser|valley|ridge|arete|cliff|saddle|rock|stone|sinkhole|cave_entrance)$\"];", - "way[natural~\"^(peak|volcano|wood|scrub|heath|grassland|fell|bare_rock|scree|shingle|sand|mud|water|wetland|glacier|bay|cape|beach|coastline|spring|hot_spring|geyser|valley|ridge|arete|cliff|saddle|rock|stone|sinkhole|cave_entrance)$\"];", - "relation[natural~\"^(peak|volcano|wood|scrub|heath|grassland|fell|bare_rock|scree|shingle|sand|mud|water|wetland|glacier|bay|cape|beach|coastline|spring|hot_spring|geyser|valley|ridge|arete|cliff|saddle|rock|stone|sinkhole|cave_entrance)$\"];", + "node[natural~\"^(peak|volcano|wood|scrub|heath|grassland|fell|bare_rock|scree|shingle|sand|mud|wetland|glacier|bay|cape|beach|coastline|spring|hot_spring|geyser|valley|ridge|arete|cliff|saddle|rock|stone|sinkhole|cave_entrance)$\"];", + "way[natural~\"^(peak|volcano|wood|scrub|heath|grassland|fell|bare_rock|scree|shingle|sand|mud|wetland|glacier|bay|cape|beach|coastline|spring|hot_spring|geyser|valley|ridge|arete|cliff|saddle|rock|stone|sinkhole|cave_entrance)$\"];", + "relation[natural~\"^(peak|volcano|wood|scrub|heath|grassland|fell|bare_rock|scree|shingle|sand|mud|wetland|glacier|bay|cape|beach|coastline|spring|hot_spring|geyser|valley|ridge|arete|cliff|saddle|rock|stone|sinkhole|cave_entrance)$\"];", ")" ], "16": [ "(", - "node[natural];", - "way[natural];", - "relation[natural];", + "node[natural][natural!~\"^(water)$\"];", + "way[natural][natural!~\"^(water)$\"];", + "relation[natural][natural!~\"^(water)$\"];", ")" ] }, @@ -116,11 +116,6 @@ "color": "#988b00", "group": "vegetation" }, - "water": { - "sign": "", - "color": "blue", - "group": "water" - }, "wetland": { "sign": "", "color": "#00baff", From 5724fad9184f94e15c4d5ac6506a41e4bc00eb62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 25 Mar 2019 14:07:38 +0100 Subject: [PATCH 03/11] natural/water: move some feature to water category (bay, spring, ...) --- natural.json | 28 ++-------------------------- water.json | 5 ++--- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/natural.json b/natural.json index 7399392..63c4757 100644 --- a/natural.json +++ b/natural.json @@ -24,16 +24,12 @@ ], "13": [ "(", - "node[natural~\"^(peak|volcano|wood|scrub|heath|grassland|fell|bare_rock|scree|shingle|sand|mud|wetland|glacier|bay|cape|beach|coastline|spring|hot_spring|geyser|valley|ridge|arete|cliff|saddle|rock|stone|sinkhole|cave_entrance)$\"];", - "way[natural~\"^(peak|volcano|wood|scrub|heath|grassland|fell|bare_rock|scree|shingle|sand|mud|wetland|glacier|bay|cape|beach|coastline|spring|hot_spring|geyser|valley|ridge|arete|cliff|saddle|rock|stone|sinkhole|cave_entrance)$\"];", - "relation[natural~\"^(peak|volcano|wood|scrub|heath|grassland|fell|bare_rock|scree|shingle|sand|mud|wetland|glacier|bay|cape|beach|coastline|spring|hot_spring|geyser|valley|ridge|arete|cliff|saddle|rock|stone|sinkhole|cave_entrance)$\"];", + "nwr[natural~\"^(peak|volcano|wood|scrub|heath|grassland|fell|bare_rock|scree|shingle|sand|mud|wetland|glacier|cape|beach|coastline|valley|ridge|arete|cliff|saddle|rock|stone|sinkhole|cave_entrance)$\"];", ")" ], "16": [ "(", - "node[natural][natural!~\"^(water)$\"];", - "way[natural][natural!~\"^(water)$\"];", - "relation[natural][natural!~\"^(water)$\"];", + "nwr[natural][natural!~\"^(water|divide|bay|strait|spring|hot_spring|geyser)$\"];", ")" ] }, @@ -126,10 +122,6 @@ "color": "white", "group": "water" }, - "bay": { - "sign": "", - "group": "water" - }, "cape": { "sign": "", "group": "water" @@ -138,10 +130,6 @@ "sign": "", "group": "water" }, - "strait": { - "sign": "", - "group": "water" - }, "beach": { "sign": "", "color": "#f9d199", @@ -151,18 +139,6 @@ "sign": "", "group": "water" }, - "spring": { - "sign": "", - "group": "water" - }, - "hot_spring": { - "sign": "", - "group": "water" - }, - "geyser": { - "sign": "", - "group": "water" - }, "reef": { "sign": "", "group": "water" diff --git a/water.json b/water.json index a2d7f22..438a6c7 100644 --- a/water.json +++ b/water.json @@ -12,15 +12,14 @@ "10": [ "(", "way[waterway~\"^(river|canal)$\"];", - "way[natural~\"^(divide)$\"];", + "nwr[natural~\"^(divide|bay|strait)$\"];", "way[natural=water][water~\"^(lake|lagoon|reservoir|canal)$\"];", "relation[natural=water][type=multipolygon][water~\"^(lake|lagoon|reservoir|canal)$\"];", ")" ], "13": [ "(", - "node[natural~\"^(water|divide)$\"];", - "way[natural~\"^(water|divide)$\"];", + "nwr[natural~\"^(water|divide|bay|strait|spring|hot_spring|geyser)$\"];", "relation[type=multipolygon][natural=water];", "relation[type=multipolygon][waterway=riverbank];", "way[waterway];", From bbe65488d40d94f4b5a2f5d9beef2c8d5d84785d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 25 Mar 2019 14:26:51 +0100 Subject: [PATCH 04/11] natural: more colors, include isthmus --- natural.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/natural.json b/natural.json index 63c4757..a990455 100644 --- a/natural.json +++ b/natural.json @@ -124,10 +124,12 @@ }, "cape": { "sign": "", + "color": "#1d7500", "group": "water" }, "peninsula": { "sign": "", + "color": "#1d7500", "group": "water" }, "beach": { @@ -137,10 +139,12 @@ }, "coastline": { "sign": "", + "color": "blue", "group": "water" }, "reef": { "sign": "", + "color": "#005fbd", "group": "water" }, "peak": { @@ -150,26 +154,32 @@ }, "hill": { "sign": "", + "color": "#4f4f4f", "group": "landform" }, "volcano": { "sign": "", + "color": "#cf3a00", "group": "landform" }, "valley": { "sign": "", + "color": "#1d7500", "group": "landform" }, "river_terrace": { "sign": "", + "color": "#a0a500", "group": "landform" }, "ridge": { "sign": "", + "color": "#4f4f4f", "group": "landform" }, "arete": { "sign": "", + "color": "#4f4f4f", "group": "landform" }, "cliff": { @@ -194,10 +204,17 @@ }, "sinkhole": { "sign": "", + "color": "#a0a500", "group": "landform" }, "cave_entrance": { "sign": "", + "color": "#000000", + "group": "landform" + }, + "isthmus": { + "sign": "", + "color": "#1d7500", "group": "landform" } } From 21451a36a24cda0336dca7a81cf72dce53b1a797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 25 Mar 2019 21:58:09 +0100 Subject: [PATCH 05/11] water: include node[waterway], style some features with pointer --- water.json | 54 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/water.json b/water.json index 438a6c7..c71a725 100644 --- a/water.json +++ b/water.json @@ -22,23 +22,39 @@ "nwr[natural~\"^(water|divide|bay|strait|spring|hot_spring|geyser)$\"];", "relation[type=multipolygon][natural=water];", "relation[type=multipolygon][waterway=riverbank];", - "way[waterway];", + "nwr[waterway];", ")" ] }, "feature": { - "description": [ + "pre": [ "{% if tags.waterway %}", - "{{ tagTrans('waterway', tags.waterway) }}", + " {% set key = 'waterway' %}", + " {% set value = tags.waterway %}", "{% elseif tags.water %}", - "{{ tagTrans('water', tags.water) }}", + " {% set key = 'water' %}", + " {% set value = tags.water %}", "{% elseif tags.natural %}", - "{{ tagTrans('natural', tags.natural) }}", + " {% set key = 'natural' %}", + " {% set value = tags.natural %}", + "{% endif %}", + "{% set kv = key ~ '=' ~ value %}" + ], + "description": [ + "{{ tagTrans(key, value) }}" + ], + "markerSign": [ + "{{ const[kv].sign|raw }}" + ], + "markerSymbol": [ + "{% if const[kv].symbol == 'pointer' %}", + "{{ markerPointer({ fillColor: '#3388ff' })|raw }}", "{% endif %}" ], - "markerSymbol": null, "listMarkerSymbol": [ - "{% if tags.natural == 'water' %}", + "{% if const[kv].symbol == 'pointer' %}", + "{{ markerCircle({ fillColor: '#3388ff' })|raw }}", + "{% elseif tags.natural == 'water' %}", "polygon", "{% else %}", "line", @@ -88,6 +104,24 @@ "textRepeat": "1" } }, + "const": { + "natural=spring": { + "sign": "", + "symbol": "pointer" + }, + "natural=hot_spring": { + "sign": "", + "symbol": "pointer" + }, + "natural=geyser": { + "sign": "", + "symbol": "pointer" + }, + "waterway=waterfall": { + "sign": "", + "symbol": "pointer" + } + }, "info": [ "", " ", @@ -112,6 +146,12 @@ " ", " ", " ", + " {% for k, data in const %}", + " ", + " ", + " ", + " ", + " {% endfor %}", "{% endif %}", " ", " ", From 4c540a699c166a4fb3ddc28d7b2ba619f40f6bb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 25 Mar 2019 22:03:47 +0100 Subject: [PATCH 06/11] natural: add a type filter --- natural.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/natural.json b/natural.json index a990455..faec7c0 100644 --- a/natural.json +++ b/natural.json @@ -46,6 +46,17 @@ "markerSymbol": "{{ markerPointer({ fillColor: const[tags.natural].color|default('#f2756a') })|raw }}", "listMarkerSymbol": "{{ markerCircle({ fillColor: const[tags.natural].color|default('#f2756a') })|raw }}" }, + "filter": { + "type": { + "name": "{{ trans('filter:type') }}", + "key": "natural", + "type": "select", + "show_default": "true", + "values": "{% set list = [] %}{% for k, v in const %}{% endfor %}", + "sort": "natsort", + "op": "has" + } + }, "const": { "wood": { "sign": "", From 9d0fe57eb4fb6c7e01f3c20068d1d1ab3668274e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Tue, 26 Mar 2019 14:52:44 +0100 Subject: [PATCH 07/11] water: add a filter for the features defined via const --- water.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/water.json b/water.json index c71a725..a48071d 100644 --- a/water.json +++ b/water.json @@ -122,6 +122,16 @@ "symbol": "pointer" } }, + "filter": { + "type": { + "name": "{{ trans('filter:type') }}", + "key": "natural", + "type": "select", + "show_default": "true", + "values": "{% for k, v in const %}{% endfor %}", + "sort": "natsort" + } + }, "info": [ "
{{ markerLine(evaluate({ \"waterway\": \"dam\" }))|raw }}{{ tagTrans('waterway', 'dam') }}, {{ tagTrans('waterway', 'weir') }}
{{ markerCircle({ fillColor: '#3388ff' })|raw }}
{{ data.sign|raw }}
{{ tagTrans(k) }}
{{ markerLine(evaluate({ \"natural\": \"divide\" }))|raw }}
", " ", From 0cc62107a0b902fa7fab7802ad239dad83c99a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Tue, 26 Mar 2019 15:31:38 +0100 Subject: [PATCH 08/11] water: rewrite other features to get style, info, ... from const --- water.json | 214 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 145 insertions(+), 69 deletions(-) diff --git a/water.json b/water.json index a48071d..5ca9357 100644 --- a/water.json +++ b/water.json @@ -38,7 +38,8 @@ " {% set key = 'natural' %}", " {% set value = tags.natural %}", "{% endif %}", - "{% set kv = key ~ '=' ~ value %}" + "{% set kv = key ~ '=' ~ value %}", + "{% set data = const[kv]|default(const['natural=water']) %}" ], "description": [ "{{ tagTrans(key, value) }}" @@ -47,57 +48,25 @@ "{{ const[kv].sign|raw }}" ], "markerSymbol": [ - "{% if const[kv].symbol == 'pointer' %}", + "{% if data.symbol == 'pointer' %}", "{{ markerPointer({ fillColor: '#3388ff' })|raw }}", "{% endif %}" ], "listMarkerSymbol": [ - "{% if const[kv].symbol == 'pointer' %}", + "{% if data.symbol == 'pointer' %}", "{{ markerCircle({ fillColor: '#3388ff' })|raw }}", - "{% elseif tags.natural == 'water' %}", + "{% elseif data.symbol == 'polygon' %}", "polygon", "{% else %}", "line", "{% endif %}" ], - "priority": [ - "{% if tags.natural == 'divide' %}", - "0", - "{% elseif tags.natural == 'water' and tags.water in ['lake', 'lagoon', 'reservoir', 'canal'] %}", - "0", - "{% elseif tags.waterway == 'river' %}", - "1", - "{% elseif tags.waterway == 'stream' or tags.waterway == 'drain' %}", - "3", - "{% elseif tags.waterway == 'ditch' %}", - "5", - "{% else %}", - "2", - "{% endif %}" - ], + "priority": "{{ data.priority }}", "style": { - "width": [ - "{% if tags.waterway == 'river' %}", - "4", - "{% elseif tags.waterway == 'stream' or tags.waterway == 'drain' %}", - "2", - "{% elseif tags.waterway == 'ditch' %}", - "1", - "{% else %}", - "3", - "{% endif %}" - ], - "color": [ - "{% if tags.natural == 'divide' %}", - "#ff0000", - "{% elseif tags.waterway in [ 'dam', 'weir' ] %}", - "#000000", - "{% else %}", - "#3388ff", - "{% endif %}" - ], + "width": "{{ data.style.width }}", + "color": "{{ data.style.color }}", "text": [ - "{% if type=='way' and tags.waterway in [ 'river', 'stream', 'canal', 'ditch', 'wadi', 'drystream', 'drain' ] %}", + "{% if data.text %}", "{{ tags.name }} ➔ ", "{% endif %}" ], @@ -105,21 +74,145 @@ } }, "const": { + "natural=water": { + "zoom": 10, + "symbol": "polygon", + "style": { + "width": 3, + "color": "#3388ff" + }, + "priority": 2 + }, + "water=lake": { + "zoom": 10, + "symbol": "polygon", + "style": { + "width": 3, + "color": "#3388ff" + }, + "hideInfo": true, + "priority": 0 + }, + "water=lagoon": { + "zoom": 10, + "symbol": "polygon", + "style": { + "width": 3, + "color": "#3388ff" + }, + "hideInfo": true, + "priority": 0 + }, + "water=reservoir": { + "zoom": 10, + "symbol": "polygon", + "style": { + "width": 3, + "color": "#3388ff" + }, + "hideInfo": true, + "priority": 0 + }, + "waterway=river": { + "zoom": 10, + "symbol": "line", + "style": { + "width": 4, + "color": "#3388ff" + }, + "text": true, + "priority": 1 + }, + "waterway=canal": { + "alias": [ + "water=canal" + ], + "zoom": 10, + "symbol": "line", + "style": { + "width": 4, + "color": "#3388ff" + }, + "text": true, + "priority": 1 + }, + "waterway=stream": { + "zoom": 13, + "symbol": "line", + "style": { + "width": 2, + "color": "#3388ff" + }, + "text": true, + "priority": 3 + }, + "waterway=drain": { + "zoom": 13, + "symbol": "line", + "style": { + "width": 2, + "color": "#3388ff" + }, + "text": true, + "priority": 3 + }, + "waterway=ditch": { + "zoom": 13, + "symbol": "line", + "style": { + "width": 1, + "color": "#3388ff" + }, + "text": true, + "priority": 5 + }, "natural=spring": { "sign": "", + "zoom": 13, "symbol": "pointer" }, "natural=hot_spring": { "sign": "", + "zoom": 13, "symbol": "pointer" }, "natural=geyser": { "sign": "", + "zoom": 13, "symbol": "pointer" }, "waterway=waterfall": { "sign": "", + "zoom": 13, "symbol": "pointer" + }, + "waterway=dam": { + "zoom": 13, + "symbol": "line", + "style": { + "width": 3, + "color": "#000000" + }, + "priority": 3 + }, + "waterway=weir": { + "zoom": 13, + "symbol": "line", + "style": { + "width": 3, + "color": "#000000" + }, + "priority": 3 + }, + "natural=divide": { + "zoom": 10, + "symbol": "line", + "style": { + "width": 3, + "color": "#ff0000" + }, + "text": true, + "priority": 0 } }, "filter": { @@ -128,45 +221,28 @@ "key": "natural", "type": "select", "show_default": "true", - "values": "{% for k, v in const %}{% endfor %}", + "values": "{% for k, data in const %}{% endfor %}", "sort": "natsort" } }, "info": [ "
", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - "{% if map.zoom >= 13 %}", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", " {% for k, data in const %}", + " {% if not data.hideInfo and data.zoom <= map.zoom %}", " ", - " ", + " ", " ", " ", + " {% endif %}", " {% endfor %}", - "{% endif %}", - " ", - " ", - " ", - " ", "
{{ markerPolygon(evaluate({ \"natural\": \"water\" }))|raw }}{{ tagTrans('natural', 'water') }}
{{ markerLine(evaluate({ \"waterway\": \"river\" }))|raw }}{{ tagTrans('waterway', 'river') }},", - " {{ tagTrans('waterway', 'canal') }}
{{ markerLine(evaluate({ \"waterway\": \"stream\" }))|raw }}{{ tagTrans('waterway', 'stream') }}, {{ tagTrans('waterway', 'drain') }}
{{ markerLine(evaluate({ \"waterway\": \"ditch\" }))|raw }}{{ tagTrans('waterway', 'ditch') }}
{{ markerLine(evaluate({ \"waterway\": \"dam\" }))|raw }}{{ tagTrans('waterway', 'dam') }}, {{ tagTrans('waterway', 'weir') }}
{{ markerCircle({ fillColor: '#3388ff' })|raw }}
{{ data.sign|raw }}
", + " {% if data.symbol == 'pointer' %}", + " {{ markerCircle({ fillColor: '#3388ff' })|raw }}
{{ data.sign|raw }}
", + " {% elseif data.symbol == 'polygon' %}", + " {{ markerPolygon(data.style)|raw }}", + " {% elseif data.symbol == 'line' %}", + " {{ markerLine(data.style)|raw }}", + " {% endif %}", + "
{{ tagTrans(k) }}
{{ markerLine(evaluate({ \"natural\": \"divide\" }))|raw }}{{ tagTrans('natural', 'divide') }}
" ] } From 3c3a26b01dc8477bcd46c9c12713d3f3b7805709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Tue, 26 Mar 2019 15:37:08 +0100 Subject: [PATCH 09/11] water: show intermittet waterways with dashed line --- water.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/water.json b/water.json index 5ca9357..879020d 100644 --- a/water.json +++ b/water.json @@ -70,7 +70,9 @@ "{{ tags.name }} ➔ ", "{% endif %}" ], - "textRepeat": "1" + "textRepeat": "1", + "dashArray": "{% if tags.intermittent == 'yes' %}5,5{% endif %}", + "lineCap": "{% if tags.intermittent == 'yes' %}butt{% else %}round{% endif %}" } }, "const": { @@ -243,6 +245,10 @@ " ", " {% endif %}", " {% endfor %}", + " ", + " {{ markerLine({ width: 3, color: '#3388ff', dashArray: '5,5', lineCap: 'butt' })|raw }}", + " {{ keyTrans('intermittent') }}", + " ", "" ] } From edc387e049616b42511bafa1a639a5c3ef104fe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Tue, 26 Mar 2019 22:01:13 +0100 Subject: [PATCH 10/11] water: additional 'intermittent' filter --- water.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/water.json b/water.json index 879020d..1b08673 100644 --- a/water.json +++ b/water.json @@ -44,6 +44,16 @@ "description": [ "{{ tagTrans(key, value) }}" ], + "body": [ + "
    ", + "{% if tags.intermittent %}", + "
  • ", + " ", + " {{ keyTrans('intermittent') }}:", + " {{ tagTrans('intermittent', tags.intermittent) }}", + "{% endif %}", + "
" + ], "markerSign": [ "{{ const[kv].sign|raw }}" ], @@ -225,6 +235,12 @@ "show_default": "true", "values": "{% for k, data in const %}{% endfor %}", "sort": "natsort" + }, + "intermittent": { + "name": "{{ keyTrans('intermittent') }}", + "key": "intermittent", + "type": "radio", + "values": "" } }, "info": [ From 582f9740294083b66393539c5653397576db961e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Wed, 27 Mar 2019 11:32:32 +0100 Subject: [PATCH 11/11] natural: update 'de' name --- lang/de.json | 2 +- natural.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/de.json b/lang/de.json index b9abf63..dc739fb 100644 --- a/lang/de.json +++ b/lang/de.json @@ -42,7 +42,7 @@ "category:memorial": "Denkmäler und Monumente", "category:military": "Militär", "category:mtb-routes": "Mointainbikerouten", - "category:natural": "Geographische Objekte", + "category:natural": "Naturformationen", "category:office": "Ämter, Dienst- und Geschäftsstellen", "category:oil_gas": "Erdöl und Erdgas", "category:organisations": "Organisationen", diff --git a/natural.json b/natural.json index faec7c0..65f8398 100644 --- a/natural.json +++ b/natural.json @@ -3,7 +3,7 @@ "name": { "ast": "Formaciones naturales", "cs": "Přírodní úkazy", - "de": "Geographische Objekte", + "de": "Naturformationen", "el": "Φυσικοί Σχηματισμοί", "en": "Natural Formations", "fr": "Éléments naturels",