diff --git a/pt.json b/pt.json index 2f76edc13..838c83ce8 100644 --- a/pt.json +++ b/pt.json @@ -88,17 +88,27 @@ "memberFeature": { "pre": [ "{% set stopName = '' %}", + "{% set isStop = false %}", + "{% set isWay = false %}", + "{% set aRoute = null %}", "{% for master in masters %}", " {% if master.tags.public_transport == 'stop_area' %}", - " {% set stopName = master.tags.name %}", + " {% set stopName = master.tags.name %}", + " {% else %}", + " {% if master.role|slice(-4) == 'stop' %}", + " {% set isStop = true %}", + " {% elseif master.role|matches('^(|forward|backward)$') %}", + " {% set isWay = true %}", + " {% endif %}", + " {% set aRoute = master %}", " {% endif %}", "{% endfor %}" ], "listStopsMarkerSymbol": "{{ markerCircle({})|raw }}", - "style": { + "styles": "{% if isStop %}stop{% elseif isWay %}way{% else %}platform{% endif %}", + "style:way": { "color": [ - "{% set master = masters[0] %}", - "{{ const[master.tags.route].color|default('#ff0000') }}" + "{{ const[aRoute.tags.route].color|default('#ff0000') }}" ], "width": "3", "text": "{% for master in masters %}{{ master.tags.ref }} {% endfor %} ", @@ -106,6 +116,17 @@ "textOffset": "12", "textFontWeight": "bold" }, + "style:stop": { + "color": [ + "{{ const[aRoute.tags.route].color|default('#ff0000') }}" + ], + "width": "5", + "radius": 3 + }, + "style:platform": { + "color": "#7f7f7f", + "width": "1" + }, "title": "{% if tags.public_transport == 'stop_position' %}{{ tags.name|default(stopName)|default(id) }}{% endif %}", "listStopsTitle": "{{ tags.name|default(stopName)|default(id) }}", "listStopsDescription": "{% for master in masters %}{{ master.tags.ref }} {% endfor %}", @@ -116,11 +137,12 @@ " {% if master.tags.public_transport != 'stop_area' %}", "