Browse Source

pt: also load stop_areas, use relation name if stop_position has no name

- missing: stop list of a route does not evaluate stop_areas
pt
parent
commit
3b8466b204
  1. 23
      pt.json

23
pt.json

@ -21,7 +21,12 @@
}, },
"query": { "query": {
"12": "relation[type=route][route~\"^(subway|monorail|ferry|train)$\"];", "12": "relation[type=route][route~\"^(subway|monorail|ferry|train)$\"];",
"14": "relation[type=route][route~\"^(subway|monorail|aerialway|bus|trolleybus|ferry|train|tram)$\"];"
"14": [
"(",
"relation[type=route][route~\"^(subway|monorail|aerialway|bus|trolleybus|ferry|train|tram)$\"];",
"relation[type=public_transport][public_transport=stop_area];",
")"
]
}, },
"members": true, "members": true,
"lists": { "lists": {
@ -57,6 +62,8 @@
} }
}, },
"feature": { "feature": {
"pre": "{% set isStopArea = tags.public_transport == 'stop_area' %}",
"listRoutesExclude": "{{ isStopArea }}",
"styles": "", "styles": "",
"title": [ "title": [
"{% if tags.ref %}{{ tags.ref }} - {% endif %}", "{% if tags.ref %}{{ tags.ref }} - {% endif %}",
@ -79,6 +86,14 @@
"listRoutesMarkerSymbol": "{{ markerCircle({fillColor:const[tags.route].color})|raw }}" "listRoutesMarkerSymbol": "{{ markerCircle({fillColor:const[tags.route].color})|raw }}"
}, },
"memberFeature": { "memberFeature": {
"pre": [
"{% set stopName = '' %}",
"{% for master in masters %}",
" {% if master.tags.public_transport == 'stop_area' %}",
" {% set stopName = master.tags.name %}",
" {% endif %}",
"{% endfor %}"
],
"listStopsMarkerSymbol": "{{ markerCircle({})|raw }}", "listStopsMarkerSymbol": "{{ markerCircle({})|raw }}",
"style": { "style": {
"color": [ "color": [
@ -91,14 +106,16 @@
"textOffset": "12", "textOffset": "12",
"textFontWeight": "bold" "textFontWeight": "bold"
}, },
"title": "{% if tags.public_transport == 'stop_position' %}{{ tags.name }}{% endif %}",
"listStopsTitle": "{{ tags.name }}",
"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 %}", "listStopsDescription": "{% for master in masters %}{{ master.tags.ref }} {% endfor %}",
"body": [ "body": [
"<h4>Routes</h4>", "<h4>Routes</h4>",
"<ul>", "<ul>",
"{% for master in masters %}", "{% for master in masters %}",
" {% if master.tags.public_transport != 'stop_area' %}",
" <li data-object=\"{{ master.id }}\"><b>{{ master.tags.name|default(master.tags.ref) }}</li>", " <li data-object=\"{{ master.id }}\"><b>{{ master.tags.name|default(master.tags.ref) }}</li>",
" {% endif %}",
"{% endfor %}", "{% endfor %}",
"</ul>" "</ul>"
], ],

Loading…
Cancel
Save