Main categories of OpenStreetBrowser
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.

209 lines
7.4 KiB

7 years ago
7 years ago
7 years ago
7 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 class='overpass-layer-list'>",
  141. "{% for master in masters %}",
  142. " {% if master.tags.public_transport != 'stop_area' %}",
  143. " <li data-object=\"{{ master.id }}\">",
  144. " <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: const[master.tags.route].color })|raw }}</div></span>",
  145. " <span class='title'>{{ master.tags.name|default(master.tags.ref) }}</a></span>",
  146. " <span class='description'>{{ tagTrans('route', master.tags.route) }}</span>",
  147. " </li>",
  148. " {% endif %}",
  149. "{% endfor %}",
  150. "</ul>"
  151. ],
  152. "listRoutesExclude": "true",
  153. "listStopsExclude": "{{ not isStop }}"
  154. },
  155. "info": [
  156. "<table>",
  157. "{% for value, data in const %}",
  158. "{% if data.zoom <= map.zoom %}",
  159. " <tr>",
  160. " <td>{{ markerCircle({fillColor:data.color})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
  161. " <td>{{ tagTrans('route', value) }}</td>",
  162. " </tr>",
  163. "{% endif %}",
  164. "{% endfor %}",
  165. "</table>"
  166. ],
  167. "const": {
  168. "train": {
  169. "sign": "<img src='maki:rail?fill=#ffffff'>",
  170. "zoom": 12,
  171. "color": "#00007f"
  172. },
  173. "subway": {
  174. "sign": "<img src='maki:rail-metro?fill=#ffffff'>",
  175. "zoom": 12,
  176. "color": "#0000ff"
  177. },
  178. "monorail": {
  179. "sign": "<span style='color: #ffffff'>M</span>",
  180. "zoom": 12,
  181. "color": "#006f8f"
  182. },
  183. "tram": {
  184. "sign": "<img src='maki:rail-light?fill=#ffffff'>",
  185. "zoom": 12,
  186. "color": "#7f007f"
  187. },
  188. "bus": {
  189. "sign": "<img src='maki:bus?fill=#ffffff'>",
  190. "zoom": 12,
  191. "color": "#af0000"
  192. },
  193. "trolleybus": {
  194. "sign": "<img src='maki:bus?fill=#ffffff'>",
  195. "zoom": 12,
  196. "color": "#af3f00"
  197. },
  198. "aerialway": {
  199. "sign": "<img src='maki:aerialway?fill=#ffffff'>",
  200. "zoom": 12,
  201. "color": "#00aaaa"
  202. },
  203. "ferry": {
  204. "sign": "<img src='maki:ferry?fill=#ffffff'>",
  205. "zoom": 12,
  206. "color": "#007fff"
  207. }
  208. }
  209. }