forked from OpenStreetBrowser/main
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
283 lines
13 KiB
283 lines
13 KiB
{
|
|
"type": "overpass",
|
|
"name": {
|
|
"de": "ÖV Karte",
|
|
"en": "Public transport map",
|
|
"fr": "Carte des transports publics",
|
|
"hu": "Tömegközlekedési térkép",
|
|
"pt-br": "Mapa de transporte público"
|
|
},
|
|
"query": {
|
|
"12": "relation[type=route][route~\"^(subway|monorail|ferry|train)$\"];",
|
|
"14": [
|
|
"(",
|
|
"relation[type=route][route~\"^(subway|monorail|aerialway|bus|trolleybus|ferry|train|tram)$\"];",
|
|
"relation[type=public_transport][public_transport=stop_area];",
|
|
")"
|
|
]
|
|
},
|
|
"lists": {
|
|
"stops": {
|
|
"prefix": "listStops",
|
|
"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-br": "Paradas e estações",
|
|
"ru": "Остановки и станции",
|
|
"uk": "Зупинки та станції"
|
|
}
|
|
},
|
|
"routes": {
|
|
"prefix": "listRoutes",
|
|
"name": {
|
|
"de": "Routen",
|
|
"en": "Routes",
|
|
"fr": "Lignes",
|
|
"hu": "Útvonalak",
|
|
"pt": "Rotas",
|
|
"pt-br": "Rotas"
|
|
}
|
|
}
|
|
},
|
|
"feature": {
|
|
"pre": "{% set isStopArea = tags.public_transport == 'stop_area' %}",
|
|
"title": [
|
|
"{% if tags.ref %}{{ tags.ref }} - {% endif %}",
|
|
"",
|
|
"{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) }}"
|
|
],
|
|
"description": "{{ tagTrans('route', tags.route) }}",
|
|
"body": [
|
|
"<h4>{{ repoTrans('category:pt:stops') }}</h4><ul class='fa-ul'>",
|
|
"{% for member in members %}",
|
|
"{% if member.tags.highway == 'bus_stop' or member.tags.amenity == 'bus_station' or member.tags.amenity == 'ferry_terminal' or member.tags.railway == 'tram_stop' or member.tags.railway == 'halt' or member.tags.railway == 'station' or member.tags.aerialway == 'station' or member.tags.public_transport == 'stop_position' or member.role|slice(0, 4) == 'stop' %}",
|
|
"<li data-object='{{ member.id }}' data-sublayer='member'><i class='fa-li {% if member.role == 'stop_entry_only' %}fas fa-sign-in-alt{% elseif member.role == 'stop_exit_only' %}fas fa-sign-out-alt{% else %}fas fa-minus{% endif %}'></i><b>{% if member.tags %}{{ member.tags.name|default(trans('unknown')) }}{% else %}<i>{{ trans('loading') }}</i>{% endif %}</b></li>",
|
|
"{% endif %}",
|
|
"{% endfor %}",
|
|
"</ul>"
|
|
],
|
|
"markerSymbol": "",
|
|
"styles": "",
|
|
"style:hover": {
|
|
"width": "0"
|
|
},
|
|
"style:selected": {
|
|
"width": "0"
|
|
},
|
|
"listStopsExclude": "true",
|
|
"listRoutesMarkerSign": "{{ const[tags.route].sign|raw }}",
|
|
"listRoutesMarkerSymbol": "{{ markerCircle({fillColor:const[tags.route].color})|raw }}",
|
|
"listRoutesExclude": "{{ isStopArea }}"
|
|
},
|
|
"members": true,
|
|
"memberFeature": {
|
|
"pre": [
|
|
"{% set stopName = '' %}",
|
|
"{% 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 %}",
|
|
"{% set isWay = false %}",
|
|
"{% set aRoute = null %}",
|
|
"{% set refs = [] %}",
|
|
"{% set dirForward = false %}",
|
|
"{% set dirBackward = false %}",
|
|
"{% set hover = false %}",
|
|
"{% set selected = false %}",
|
|
"{% for master in masters %}",
|
|
" {% if master.tags.public_transport == 'stop_area' %}",
|
|
" {% set stopName = master.tags.name %}",
|
|
" {% else %}",
|
|
" {% if master.role|matches('^(|.*stop)$') and isStop %}",
|
|
" {% set isStop = true %}",
|
|
" {% set stopCount = stopCount + 1 %}",
|
|
" {% elseif master.role|matches('^(|forward|backward)$') and type == 'way' %}",
|
|
" {% set isWay = true %}",
|
|
" {% endif %}",
|
|
" {% set aRoute = master %}",
|
|
"",
|
|
" {% if master.tags.ref %}",
|
|
" {% set refs = refs|merge([ master.tags.ref ]) %}",
|
|
" {% endif %}",
|
|
" {% if master.dir == 'forward' %}{% set dirForward = true %}",
|
|
" {% elseif master.dir == 'backward' %}{% set dirBackward = true %}",
|
|
" {% else %}{% set dirForward = true %}{% set dirBackward = true %}",
|
|
" {% endif %}",
|
|
" {% endif %}",
|
|
"",
|
|
" {% if master.flags.hover %}{% set hover = master.dir|default('both') %}{% endif %}",
|
|
" {% if master.flags.selected %}{% set selected = master.dir|default('both') %}{% endif %}",
|
|
"{% endfor %}",
|
|
"",
|
|
"{% set refs = refs|unique|natsort({ insensitive: true }) %}",
|
|
"{% set color = const[aRoute.tags.route].color %}"
|
|
],
|
|
"title": "{% if isStop %}{{ tags.name|default(stopName)|default(id) }}{% endif %}",
|
|
"body": [
|
|
"<h4>{{ repoTrans('category:pt:routes') }}</h4>",
|
|
"<ul class='overpass-layer-list'>",
|
|
"{% for master in masters %}",
|
|
" {% if master.tags.public_transport != 'stop_area' %}",
|
|
" <li data-object=\"{{ master.id }}\">",
|
|
" <span class='markerParent'><div class='marker'>{{ markerCircle({fillColor:const[master.tags.route].color})|raw }}</div><div class='icon'>{{ const[master.tags.route].sign|raw }}</div></span>",
|
|
" <span class='title'>{% if master.tags.ref and master.tags.name %}{{ master.tags.ref }} - {{ master.tags.name|default(master.tags.ref) }}{% elseif master.tags.ref %}{{ master.tags.ref }}{% elseif master.tags.name %}{{ master.tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}</span>",
|
|
" <span class='description'>{{ tagTrans('route', master.tags.route) }}</span>",
|
|
" </li>",
|
|
" {% endif %}",
|
|
"{% endfor %}",
|
|
"</ul>"
|
|
],
|
|
"markerSign": " ",
|
|
"markerSymbol": "{% if isStop and stopCount > 0 %}{% if hover or selected %}{{ markerPointer({ })|raw }}{% endif %}{% endif %}",
|
|
"styles": "{% if isStop and stopCount > 0 %}stop{% elseif isWay %}casing,way{% if hover %},hover{% endif %}{% if selected %},selected{% endif %}{% endif %}",
|
|
"style:hover": {
|
|
"pane": "hover",
|
|
"width": "4",
|
|
"color": "black",
|
|
"lineCap": "{% if hover == 'forward' or hover == 'backward' %}butt{% else %}round{% endif %}",
|
|
"dashArray": "{% if hover == 'forward' or hover == 'backward' %}27,8{% endif %}",
|
|
"dashOffset": "{% if hover == 'backward' %}28{% else %}0{% endif %}",
|
|
"noClip": "{% if hover == 'forward' or hover == 'backward' %}true{% else %}false{% endif %}",
|
|
"pattern": "{% if hover == 'forward' or hover == 'backward' %}arrowHead{% endif %}",
|
|
"pattern-offset": "{% if hover == 'backward' %}4{% else %}30.5{% endif %}",
|
|
"pattern-repeat": "35",
|
|
"pattern-polygon": "true",
|
|
"pattern-pixelSize": "9",
|
|
"pattern-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}",
|
|
"pattern-path-width": "0",
|
|
"pattern-path-color": "black",
|
|
"pattern-path-fillOpacity": "1"
|
|
},
|
|
"style:selected": {
|
|
"pane": "selected",
|
|
"width": "4",
|
|
"color": "#3f3f3f",
|
|
"lineCap": "{% if selected == 'forward' or selected == 'backward' %}butt{% else %}round{% endif %}",
|
|
"dashArray": "{% if selected == 'forward' or selected == 'backward' %}27,8{% endif %}",
|
|
"dashOffset": "{% if selected == 'backward' %}28{% else %}0{% endif %}",
|
|
"noClip": "{% if selected == 'forward' or selected == 'backward' %}true{% else %}false{% endif %}",
|
|
"pattern": "{% if selected == 'forward' or selected == 'backward' %}arrowHead{% endif %}",
|
|
"pattern-offset": "{% if selected == 'backward' %}4{% else %}30.5{% endif %}",
|
|
"pattern-repeat": "35",
|
|
"pattern-polygon": "true",
|
|
"pattern-pixelSize": "9",
|
|
"pattern-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}",
|
|
"pattern-path-width": "0",
|
|
"pattern-path-color": "#3f3f3f",
|
|
"pattern-path-fillOpacity": "1"
|
|
},
|
|
"listStopsMarkerSign": null,
|
|
"listStopsMarkerSymbol": "{{ markerCircle({ width: 5, color: color, fillOpacity: '1', radius: 3 })|raw }}",
|
|
"listStopsExclude": "{{ not isStop or stopCount == 0 }}",
|
|
"listStopsTitle": "{% if tags %}{{ tags.name|default(stopName)|default(trans('unknown')) }}{% else %}<li>{{ trans('loading') }}</li>{% endif %}",
|
|
"listStopsDescription": "{{ refs|join(' · ') }}",
|
|
"listRoutesExclude": "true",
|
|
"style:stop": {
|
|
"width": "4",
|
|
"color": "{{ color|default('#ff0000') }}",
|
|
"radius": "3",
|
|
"zIndex": "1"
|
|
},
|
|
"style:way": {
|
|
"width": "4",
|
|
"color": "{{ color|default('#ff0000') }}",
|
|
"opacity": "1",
|
|
"lineCap": "{% if not dirForward or not dirBackward %}butt{% else %}round{% endif %}",
|
|
"dashArray": "{% if not dirForward or not dirBackward %}27,8{% endif %}",
|
|
"dashOffset": "{% if dirBackward %}28{% else %}0{% endif %}",
|
|
"noClip": "{% if not dirForward or not dirBackward %}true{% else %}false{% endif %}",
|
|
"text": "{{ refs|join(' · ') }} ",
|
|
"textRepeat": "1",
|
|
"textOffset": "12",
|
|
"pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}",
|
|
"pattern-offset": "{% if dirBackward %}4{% else %}30.5{% endif %}",
|
|
"pattern-repeat": "35",
|
|
"pattern-polygon": "true",
|
|
"pattern-pixelSize": "9",
|
|
"pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}",
|
|
"pattern-path-width": "0",
|
|
"pattern-path-color": "{{ color|default('#ff0000') }}",
|
|
"pattern-path-fillOpacity": "1",
|
|
"textFontWeight": "bold"
|
|
}
|
|
},
|
|
"info": [
|
|
"<table>",
|
|
"{% for value, data in const %}",
|
|
"{% if data.zoom <= map.zoom %}",
|
|
" <tr>",
|
|
" <td>{{ markerCircle({fillColor:data.color})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
|
|
" <td>{{ tagTrans('route', value) }}</td>",
|
|
" </tr>",
|
|
"{% endif %}",
|
|
"{% endfor %}",
|
|
"</table>"
|
|
],
|
|
"const": {
|
|
"train": {
|
|
"sign": "<img data-src='maki:rail?fill=#ffffff'>",
|
|
"zoom": 12,
|
|
"color": "#00007f"
|
|
},
|
|
"subway": {
|
|
"sign": "<img data-src='maki:rail-metro?fill=#ffffff'>",
|
|
"zoom": 12,
|
|
"color": "#0000ff"
|
|
},
|
|
"monorail": {
|
|
"sign": "<span style='color: #ffffff'>M</span>",
|
|
"zoom": 12,
|
|
"color": "#006f8f"
|
|
},
|
|
"tram": {
|
|
"sign": "<img data-src='maki:rail-light?fill=#ffffff'>",
|
|
"zoom": 12,
|
|
"color": "#7f007f"
|
|
},
|
|
"bus": {
|
|
"sign": "<img data-src='maki:bus?fill=#ffffff'>",
|
|
"zoom": 12,
|
|
"color": "#af0000"
|
|
},
|
|
"trolleybus": {
|
|
"sign": "<img data-src='maki:bus?fill=#ffffff'>",
|
|
"zoom": 12,
|
|
"color": "#af3f00"
|
|
},
|
|
"aerialway": {
|
|
"sign": "<img data-src='maki:aerialway?fill=#ffffff'>",
|
|
"zoom": 12,
|
|
"color": "#00aaaa"
|
|
},
|
|
"ferry": {
|
|
"sign": "<img data-src='maki:ferry?fill=#ffffff'>",
|
|
"zoom": 12,
|
|
"color": "#007fff"
|
|
}
|
|
},
|
|
"filter": {
|
|
"route": {
|
|
"type": "select",
|
|
"show_default": "true",
|
|
"valueName": "{{ tagTrans('route', value) }}",
|
|
"values": [
|
|
"aerialway",
|
|
"bus",
|
|
"ferry",
|
|
"subway",
|
|
"train",
|
|
"tram",
|
|
"trolleybus"
|
|
]
|
|
}
|
|
}
|
|
}
|