diff --git a/index.json b/index.json index 9bc3268c6..53f5edbef 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 000000000..881d2d2ea --- /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": [ + "