diff --git a/index.json b/index.json index b855d859..9bc3268c 100644 --- a/index.json +++ b/index.json @@ -159,38 +159,7 @@ ] }, { - "id": "transport_pt", - "type": "index", - "name": { - "ast": "Tresporte Públicu", - "cs": "Veřejná doprava", - "de": "Öffentlicher Verkehr", - "el": "Δημόσιες Μεταφορές", - "en": "Public Transportation", - "et": "Ühistransport", - "fr": "Transports publics", - "hu": "Tömegközlekedés", - "it": "Trasporti pubblici", - "ja": "公共輸送", - "nl": "Openbaar vervoer", - "pl": "Transport Publiczny", - "ro": "Transport public", - "ru": "Общественный транспорт", - "uk": "Громадський транспорт", - "pt-br": "Transporte Público", - "pt": "Transportes públicos" - }, - "subCategories": [ - { - "id": "pt_amenities" - }, - { - "id": "pt_stops" - }, - { - "id": "pt_routes" - } - ] + "id": "pt" }, { "id": "transport_car", diff --git a/pt_routes.json b/pt.json similarity index 54% rename from pt_routes.json rename to pt.json index dbcf8df2..1ac160dc 100644 --- a/pt_routes.json +++ b/pt.json @@ -1,6 +1,25 @@ { "type": "overpass", "name": { + "ast": "Tresporte Públicu", + "cs": "Veřejná doprava", + "de": "Öffentlicher Verkehr", + "el": "Δημόσιες Μεταφορές", + "en": "Public Transportation", + "et": "Ühistransport", + "fr": "Transports publics", + "hu": "Tömegközlekedés", + "it": "Trasporti pubblici", + "ja": "公共輸送", + "nl": "Openbaar vervoer", + "pl": "Transport Publiczny", + "ro": "Transport public", + "ru": "Общественный транспорт", + "uk": "Громадський транспорт", + "pt-br": "Transporte Público", + "pt": "Transportes públicos" + }, + "name_routes": { "de": "Routen", "en": "Routes", "fr": "Lignes", @@ -11,13 +30,23 @@ "12": "relation[type=route][route~\"^(subway|monorail|ferry|train)$\"];", "14": "relation[type=route][route~\"^(subway|monorail|aerialway|bus|trolleybus|ferry|train|tram)$\"];" }, + "members": true, "feature": { + "styles": "", "title": [ "{% if tags.ref %}{{ tags.ref }} - {% endif %}", "", "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) | default(trans('unnamed')) }}" ], "description": "{{ tagTrans('route', tags.route) }}", + "body": [ + "

Stops

", + "{% for member in members %}", + "{% if member.role|slice(-4) == 'stop' %}", + "
{{ member.tags.name }}
", + "{% endif %}", + "{% endfor %}" + ], "listMarkerSign": "{{ const[tags.route].sign|raw }}", "markerSymbol": null, "listMarkerSymbol": "{{ markerCircle({fillColor:const[tags.route].color})|raw }}", @@ -25,6 +54,25 @@ "color": "{{ const[tags.route].color }}" } }, + "memberFeature": { + "listMarkerSymbol": "{{ markerCircle({})|raw }}", + "style": { + "color": [ + "{% set master = masters[0] %}", + "{{ {'subway':'#0000ff','tram':'#007fff','trolley':'#ff007f','bus':'#ff0000'}[master.tags.route]|default('#000000') }}" + ], + "width": "{% if map.zoom>=15 %}5{% else %}3{% endif %}" + }, + "title": "{% if tags.public_transport == 'stop_position' %}{{ tags.name }}{% endif %}", + "listStopsTitle": "{{ tags.name }}: {% for master in masters %}{{ master.tags.ref }} {% endfor %}", + "body": [ + "{% for master in masters %}", + " '
{{ master.tags.name|default(master.tags.ref) }} ({{ master.id }})
", + "{% endfor %}" + ], + "listRoutesExclude": "true", + "listStopsExclude": "{% set isStop = 0 %}{% for master in masters %}{% if master.role|slice(-4) == 'stop' %}{% set isStop = 1 %}{% endif %}{% endfor %}{{ not isStop }}" + }, "info": [ "", "{% for value, data in const %}", diff --git a/pt_stops.json b/pt_stops.json deleted file mode 100644 index 97b35d91..00000000 --- a/pt_stops.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "type": "overpass", - "name": { - "ast": "Paraes y estaciones", - "cs": "Zastávky & Stanice", - "de": "Haltestellen", - "el": "Στάσεις & Σταθμοί", - "en": "Stops & Stations", - "es": "Paradas y estaciones", - "fr": "Arrêts/Stops, Stations", - "hu": "Megállók és állomások", - "it": "Stazioni e fermate", - "ja": "停留所と駅", - "nl": "Haltes en Stations", - "pl": "Przystanki i Stacje", - "pt": "Paragens e estações", - "pt-br": "Paradas e Estações", - "ru": "Остановки и станции", - "uk": "Зупинки та станції" - }, - "query": { - "14": [ - "(", - "node[railway~\"^(station|halt|tram_stop|platform)$\"];", - "way[railway~\"^(station|platform)$\"];", - "node[highway~\"^(bus_stop|platform)$\"];", - "way[highway~\"^(platform)$\"];", - "node[public_transport~\"^(stop_position|platform)$\"];", - "way[public_transport~\"^(platform)$\"];", - "node[amenity~\"^(ferry_terminal|bus_station)$\"];", - ")" - ] - }, - "feature": { - "pre": [ - "{% if tags.amenity in [ 'ferry_terminal', 'bus_station' ] %}", - " {% set key = 'amenity' %}", - " {% set value = tags.amenity %}", - "{% elseif tags.railway == 'platform' or tags.highway == 'platform' or tags.public_transport == 'platform' %}", - " {% set key = 'public_transport' %}", - " {% set value = 'platform' %}", - "{% else %}", - " {% set key = 'public_transport' %}", - " {% set value = 'stop_position' %}", - "{% endif %}" - ], - "description": "{{ tagTrans(key, value) }}" - } -}