From 444d6a50ae6b7a7ecaa5da9e0cbe7d8a9c8a9283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at> Date: Thu, 30 Nov 2017 08:45:50 +0100 Subject: [PATCH] water: improvements - prioritise features - map key: show entries dependend on map zoom - map key: include ditch --- water.json | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/water.json b/water.json index 9298974..66a91a2 100644 --- a/water.json +++ b/water.json @@ -41,6 +41,21 @@ "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' %}", + "3", + "{% elseif tags.waterway == 'ditch' %}", + "5", + "{% else %}", + "2", + "{% endif %}" + ], "style": { "weight": [ "{% if tags.waterway == 'river' %}", @@ -77,16 +92,23 @@ " </tr>", " <tr>", " <td>{{ markerLine(evaluate({ \"waterway\": \"river\" }))|raw }}</td>", - " <td>{{ tagTrans('waterway', 'river') }}</td>", + " <td>{{ tagTrans('waterway', 'river') }},", + " {{ tagTrans('waterway', 'canal') }}</td>", " </tr>", + "{% if map.zoom >= 13 %}", " <tr>", " <td>{{ markerLine(evaluate({ \"waterway\": \"stream\" }))|raw }}</td>", " <td>{{ tagTrans('waterway', 'stream') }}</td>", " </tr>", " <tr>", + " <td>{{ markerLine(evaluate({ \"waterway\": \"ditch\" }))|raw }}</td>", + " <td>{{ tagTrans('waterway', 'ditch') }}</td>", + " </tr>", + " <tr>", " <td>{{ markerLine(evaluate({ \"waterway\": \"dam\" }))|raw }}</td>", " <td>{{ tagTrans('waterway', 'dam') }}, {{ tagTrans('waterway', 'weir') }}</td>", " </tr>", + "{% endif %}", " <tr>", " <td>{{ markerLine(evaluate({ \"natural\": \"divide\" }))|raw }}</td>", " <td>{{ tagTrans('natural', 'divide') }}</td>",