Main categories of OpenStreetBrowser with public transport zoom level
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.

205 lines
7.0 KiB

6 years ago
6 years ago
6 years ago
6 years ago
  1. {
  2. "type": "overpass",
  3. "name": {
  4. "ast": "Tresporte Públicu",
  5. "cs": "Veřejná doprava",
  6. "de": "Öffentlicher Verkehr",
  7. "el": "Δημόσιες Μεταφορές",
  8. "en": "Public Transportation",
  9. "et": "Ühistransport",
  10. "fr": "Transports publics",
  11. "hu": "Tömegközlekedés",
  12. "it": "Trasporti pubblici",
  13. "ja": "公共輸送",
  14. "nl": "Openbaar vervoer",
  15. "pl": "Transport Publiczny",
  16. "ro": "Transport public",
  17. "ru": "Общественный транспорт",
  18. "uk": "Громадський транспорт",
  19. "pt-br": "Transporte Público",
  20. "pt": "Transportes públicos"
  21. },
  22. "query": {
  23. "12": "relation[type=route][route~\"^(subway|monorail|ferry|train)$\"];",
  24. "14": [
  25. "(",
  26. "relation[type=route][route~\"^(subway|monorail|aerialway|bus|trolleybus|ferry|train|tram)$\"];",
  27. "relation[type=public_transport][public_transport=stop_area];",
  28. ")"
  29. ]
  30. },
  31. "members": true,
  32. "lists": {
  33. "stops": {
  34. "prefix": "listStops",
  35. "name": {
  36. "ast": "Paraes y estaciones",
  37. "cs": "Zastávky & Stanice",
  38. "de": "Haltestellen",
  39. "el": "Στάσεις & Σταθμοί",
  40. "en": "Stops & Stations",
  41. "es": "Paradas y estaciones",
  42. "fr": "Arrêts/Stops, Stations",
  43. "hu": "Megállók és állomások",
  44. "it": "Stazioni e fermate",
  45. "ja": "停留所と駅",
  46. "nl": "Haltes en Stations",
  47. "pl": "Przystanki i Stacje",
  48. "pt-br": "Paradas e Estações",
  49. "ru": "Остановки и станции",
  50. "uk": "Зупинки та станції"
  51. }
  52. },
  53. "routes": {
  54. "prefix": "listRoutes",
  55. "name": {
  56. "de": "Routen",
  57. "en": "Routes",
  58. "fr": "Lignes",
  59. "pt": "Rotas",
  60. "pt-br": "Rotas"
  61. }
  62. }
  63. },
  64. "feature": {
  65. "pre": "{% set isStopArea = tags.public_transport == 'stop_area' %}",
  66. "listRoutesExclude": "{{ isStopArea }}",
  67. "styles": "",
  68. "title": [
  69. "{% if tags.ref %}{{ tags.ref }} - {% endif %}",
  70. "",
  71. "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) | default(trans('unnamed')) }}"
  72. ],
  73. "description": "{{ tagTrans('route', tags.route) }}",
  74. "body": [
  75. "<h4>Stops</h4><ul>",
  76. "{% for member in members %}",
  77. "{% if member.role|slice(-4) == 'stop' %}",
  78. "<li data-object='{{ member.id }}' data-sublayer='member'><b>{{ member.tags.name|default(member.id) }}</li>",
  79. "{% endif %}",
  80. "{% endfor %}",
  81. "</ul>"
  82. ],
  83. "listStopsExclude": "true",
  84. "listRoutesMarkerSign": "{{ const[tags.route].sign|raw }}",
  85. "markerSymbol": null,
  86. "listRoutesMarkerSymbol": "{{ markerCircle({fillColor:const[tags.route].color})|raw }}"
  87. },
  88. "memberFeature": {
  89. "pre": [
  90. "{% set stopName = '' %}",
  91. "{% set isStop = false %}",
  92. "{% set isWay = false %}",
  93. "{% set aRoute = null %}",
  94. "{% set refs = [] %}",
  95. "{% for master in masters %}",
  96. " {% if master.tags.public_transport == 'stop_area' %}",
  97. " {% set stopName = master.tags.name %}",
  98. " {% else %}",
  99. " {% if master.role|slice(-4) == 'stop' %}",
  100. " {% set isStop = true %}",
  101. " {% elseif master.role|matches('^(|forward|backward)$') %}",
  102. " {% set isWay = true %}",
  103. " {% endif %}",
  104. " {% set aRoute = master %}",
  105. "",
  106. " {% if master.tags.ref %}",
  107. " {% set refs = refs|merge([ master.tags.ref ]) %}",
  108. " {% endif %}",
  109. " {% endif %}",
  110. "{% endfor %}",
  111. "",
  112. "{% set refs = refs|unique|natsort({ insensitive: true }) %}",
  113. "{% set color = const[aRoute.tags.route].color %}"
  114. ],
  115. "listStopsMarkerSymbol": "{{ markerCircle({ width: 5, color: color, fillOpacity: '1', radius: 3 })|raw }}",
  116. "listStopsMarkerSign": "",
  117. "styles": "{% if isStop %}stop{% elseif isWay %}way{% else %}{% endif %}",
  118. "style:way": {
  119. "color": [
  120. "{{ color|default('#ff0000') }}"
  121. ],
  122. "width": "3",
  123. "text": "{{ refs|join(' ') }} ",
  124. "textRepeat": "1",
  125. "textOffset": "12",
  126. "textFontWeight": "bold"
  127. },
  128. "style:stop": {
  129. "color": [
  130. "{{ color|default('#ff0000') }}"
  131. ],
  132. "width": "5",
  133. "radius": 3
  134. },
  135. "title": "{% if tags.public_transport == 'stop_position' %}{{ tags.name|default(stopName)|default(id) }}{% endif %}",
  136. "listStopsTitle": "{{ tags.name|default(stopName)|default(id) }}",
  137. "listStopsDescription": "{{ refs|join(' ') }}",
  138. "body": [
  139. "<h4>Routes</h4>",
  140. "<ul>",
  141. "{% for master in masters %}",
  142. " {% if master.tags.public_transport != 'stop_area' %}",
  143. " <li data-object=\"{{ master.id }}\"><b>{{ master.tags.name|default(master.tags.ref) }}</li>",
  144. " {% endif %}",
  145. "{% endfor %}",
  146. "</ul>"
  147. ],
  148. "listRoutesExclude": "true",
  149. "listStopsExclude": "{{ not isStop }}"
  150. },
  151. "info": [
  152. "<table>",
  153. "{% for value, data in const %}",
  154. "{% if data.zoom <= map.zoom %}",
  155. " <tr>",
  156. " <td>{{ markerCircle({fillColor:data.color})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
  157. " <td>{{ tagTrans('route', value) }}</td>",
  158. " </tr>",
  159. "{% endif %}",
  160. "{% endfor %}",
  161. "</table>"
  162. ],
  163. "const": {
  164. "train": {
  165. "sign": "<img src='maki:rail?fill=#ffffff'>",
  166. "zoom": 12,
  167. "color": "#00007f"
  168. },
  169. "subway": {
  170. "sign": "<img src='maki:rail-metro?fill=#ffffff'>",
  171. "zoom": 12,
  172. "color": "#0000ff"
  173. },
  174. "monorail": {
  175. "sign": "<span style='color: #ffffff'>M</span>",
  176. "zoom": 12,
  177. "color": "#006f8f"
  178. },
  179. "tram": {
  180. "sign": "<img src='maki:rail-light?fill=#ffffff'>",
  181. "zoom": 12,
  182. "color": "#7f007f"
  183. },
  184. "bus": {
  185. "sign": "<img src='maki:bus?fill=#ffffff'>",
  186. "zoom": 12,
  187. "color": "#af0000"
  188. },
  189. "trolleybus": {
  190. "sign": "<img src='maki:bus?fill=#ffffff'>",
  191. "zoom": 12,
  192. "color": "#af3f00"
  193. },
  194. "aerialway": {
  195. "sign": "<img src='maki:aerialway?fill=#ffffff'>",
  196. "zoom": 12,
  197. "color": "#00aaaa"
  198. },
  199. "ferry": {
  200. "sign": "<img src='maki:ferry?fill=#ffffff'>",
  201. "zoom": 12,
  202. "color": "#007fff"
  203. }
  204. }
  205. }