Browse Source

pt: show only stops with min. 1 route

filter
parent
commit
dcb7010a71
  1. 6
      pt.json

6
pt.json

@ -74,6 +74,7 @@
"pre": [ "pre": [
"{% set stopName = '' %}", "{% set stopName = '' %}",
"{% set isStop = false %}", "{% set isStop = false %}",
"{% set stopCount = 0 %}",
"{% if tags.highway == 'bus_stop' or tags.amenity == 'bus_station' or tags.amenity == 'ferry_terminal' or tags.railway == 'tram_stop' or tags.railway == 'halt' or tags.railway == 'station' or tags.aerialway == 'station' or tags.public_transport == 'stop_position' %}{% set isStop = true %}{% endif %}", "{% if tags.highway == 'bus_stop' or tags.amenity == 'bus_station' or tags.amenity == 'ferry_terminal' or tags.railway == 'tram_stop' or tags.railway == 'halt' or tags.railway == 'station' or tags.aerialway == 'station' or tags.public_transport == 'stop_position' %}{% set isStop = true %}{% endif %}",
"{% set isWay = false %}", "{% set isWay = false %}",
"{% set aRoute = null %}", "{% set aRoute = null %}",
@ -84,6 +85,7 @@
" {% else %}", " {% else %}",
" {% if master.role|matches('^(|.*stop)$') and isStop %}", " {% if master.role|matches('^(|.*stop)$') and isStop %}",
" {% set isStop = true %}", " {% set isStop = true %}",
" {% set stopCount = stopCount + 1 %}",
" {% elseif master.role|matches('^(|forward|backward)$') and type == 'way' %}", " {% elseif master.role|matches('^(|forward|backward)$') and type == 'way' %}",
" {% set isWay = true %}", " {% set isWay = true %}",
" {% endif %}", " {% endif %}",
@ -100,7 +102,7 @@
], ],
"listStopsMarkerSymbol": "{{ markerCircle({ width: 5, color: color, fillOpacity: '1', radius: 3 })|raw }}", "listStopsMarkerSymbol": "{{ markerCircle({ width: 5, color: color, fillOpacity: '1', radius: 3 })|raw }}",
"listStopsMarkerSign": "", "listStopsMarkerSign": "",
"styles": "{% if isStop %}stop{% elseif isWay %}way{% else %}{% endif %}",
"styles": "{% if isStop and stopCount > 0 %}stop{% elseif isWay %}way{% else %}{% endif %}",
"style:way": { "style:way": {
"color": [ "color": [
"{{ color|default('#ff0000') }}" "{{ color|default('#ff0000') }}"
@ -136,7 +138,7 @@
"</ul>" "</ul>"
], ],
"listRoutesExclude": "true", "listRoutesExclude": "true",
"listStopsExclude": "{{ not isStop }}"
"listStopsExclude": "{{ not isStop or stopCount == 0 }}"
}, },
"info": [ "info": [
"<table>", "<table>",

Loading…
Cancel
Save