From fcd65084cace3f70a10b2291106b15ef993c4186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 3 Aug 2018 10:04:21 +0200 Subject: [PATCH] railway-routes --- index.json | 3 +++ railway-routes.json | 46 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 railway-routes.json diff --git a/index.json b/index.json index 9bc3268c..53f5edbe 100644 --- a/index.json +++ b/index.json @@ -238,6 +238,9 @@ }, { "id": "railway-electrification" + }, + { + "id": "railway-routes" } ] }, diff --git a/railway-routes.json b/railway-routes.json new file mode 100644 index 00000000..881d2d2e --- /dev/null +++ b/railway-routes.json @@ -0,0 +1,46 @@ +{ + "type": "overpass", + "name": { + "en": "Railway Routes" + }, + "query": { + "12": "relation[type=route][route=railway]" + }, + "members": true, + "feature": { + "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': '#ff0000' })|raw }}", + "description": "{{ tags.operator }}", + "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": "" + }, + "memberFeature": { + "pre": [ + "{% set refs = [] %}", + "", + "{% for master in masters %}", + " {% if master.tags.ref %}", + " {% set refs = refs|merge([ master.tags.ref ]) %}", + " {% endif %}", + "{% endfor %}" + ], + "title": "", + "body": [ + "

Routes

", + "" + ], + "listExclude": "1", + "style": { + "color": "#ff0000", + "width": 4, + "opacity": 1, + "text": "{{ refs|join(' ') }} ", + "textRepeat": "1", + "textOffset": "12", + "textFontWeight": "bold" + } + } +}