From 0c9e212b4ab5683236267a7457a4c5cb9cc182f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 3 Aug 2018 22:36:27 +0200 Subject: [PATCH] cycle_routes, hiking_routes: improve popup --- cycle_routes.json | 12 +++++++++--- hiking_routes.json | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/cycle_routes.json b/cycle_routes.json index d5ad8feef..44509f6bc 100644 --- a/cycle_routes.json +++ b/cycle_routes.json @@ -17,8 +17,10 @@ "feature": { "priority": "{{ {icn:0,ncn:1,rcn:2,lcn:3}[tags.network] }}", "description": "{{ tagTrans('network', tags.network) }}", - "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network].color })|raw }}", - "styles": "" + "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network].color|default(const[''].color) })|raw }}", + "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}", + "styles": "", + "markerSymbol": "" }, "memberFeature": { "pre": [ @@ -42,7 +44,11 @@ "

Routes

", "" ], diff --git a/hiking_routes.json b/hiking_routes.json index 486238b4c..964a70131 100644 --- a/hiking_routes.json +++ b/hiking_routes.json @@ -17,8 +17,10 @@ "feature": { "priority": "{{ {iwn:0,nwn:1,rwn:2,lwn:3}[tags.network]|default(4) }}", "description": "{% if tags.network %}{{ tagTrans('network', tags.network) }}{% endif %}", - "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network|default('')].color })|raw }}", - "styles": "" + "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network|default('')].color|default(const[''].color) })|raw }}", + "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}", + "styles": "", + "markerSymbol": "" }, "memberFeature": { "pre": [ @@ -41,7 +43,11 @@ "

Routes

", "" ],