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.

201 lines
6.9 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. "{% for master in masters %}",
  95. " {% if master.tags.public_transport == 'stop_area' %}",
  96. " {% set stopName = master.tags.name %}",
  97. " {% else %}",
  98. " {% if master.role|slice(-4) == 'stop' %}",
  99. " {% set isStop = true %}",
  100. " {% elseif master.role|matches('^(|forward|backward)$') %}",
  101. " {% set isWay = true %}",
  102. " {% endif %}",
  103. " {% set aRoute = master %}",
  104. " {% endif %}",
  105. "{% endfor %}"
  106. ],
  107. "listStopsMarkerSymbol": "{{ markerCircle({})|raw }}",
  108. "styles": "{% if isStop %}stop{% elseif isWay %}way{% else %}platform{% endif %}",
  109. "style:way": {
  110. "color": [
  111. "{{ const[aRoute.tags.route].color|default('#ff0000') }}"
  112. ],
  113. "width": "3",
  114. "text": "{% for master in masters %}{{ master.tags.ref }} {% endfor %} ",
  115. "textRepeat": "1",
  116. "textOffset": "12",
  117. "textFontWeight": "bold"
  118. },
  119. "style:stop": {
  120. "color": [
  121. "{{ const[aRoute.tags.route].color|default('#ff0000') }}"
  122. ],
  123. "width": "5",
  124. "radius": 3
  125. },
  126. "style:platform": {
  127. "color": "#7f7f7f",
  128. "width": "1"
  129. },
  130. "title": "{% if tags.public_transport == 'stop_position' %}{{ tags.name|default(stopName)|default(id) }}{% endif %}",
  131. "listStopsTitle": "{{ tags.name|default(stopName)|default(id) }}",
  132. "listStopsDescription": "{% for master in masters %}{{ master.tags.ref }} {% endfor %}",
  133. "body": [
  134. "<h4>Routes</h4>",
  135. "<ul>",
  136. "{% for master in masters %}",
  137. " {% if master.tags.public_transport != 'stop_area' %}",
  138. " <li data-object=\"{{ master.id }}\"><b>{{ master.tags.name|default(master.tags.ref) }}</li>",
  139. " {% endif %}",
  140. " {{ master.role }}",
  141. "{% endfor %}",
  142. "</ul>"
  143. ],
  144. "listRoutesExclude": "true",
  145. "listStopsExclude": "{{ not isStop }}"
  146. },
  147. "info": [
  148. "<table>",
  149. "{% for value, data in const %}",
  150. "{% if data.zoom <= map.zoom %}",
  151. " <tr>",
  152. " <td>{{ markerCircle({fillColor:data.color})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
  153. " <td>{{ tagTrans('route', value) }}</td>",
  154. " </tr>",
  155. "{% endif %}",
  156. "{% endfor %}",
  157. "</table>"
  158. ],
  159. "const": {
  160. "train": {
  161. "sign": "<img src='maki:rail?fill=#ffffff'>",
  162. "zoom": 12,
  163. "color": "#00007f"
  164. },
  165. "subway": {
  166. "sign": "<img src='maki:rail-metro?fill=#ffffff'>",
  167. "zoom": 12,
  168. "color": "#0000ff"
  169. },
  170. "monorail": {
  171. "sign": "<span style='color: #ffffff'>M</span>",
  172. "zoom": 12,
  173. "color": "#006f8f"
  174. },
  175. "tram": {
  176. "sign": "<img src='maki:rail-light?fill=#ffffff'>",
  177. "zoom": 12,
  178. "color": "#7f007f"
  179. },
  180. "bus": {
  181. "sign": "<img src='maki:bus?fill=#ffffff'>",
  182. "zoom": 12,
  183. "color": "#af0000"
  184. },
  185. "trolleybus": {
  186. "sign": "<img src='maki:bus?fill=#ffffff'>",
  187. "zoom": 12,
  188. "color": "#af3f00"
  189. },
  190. "aerialway": {
  191. "sign": "<img src='maki:aerialway?fill=#ffffff'>",
  192. "zoom": 12,
  193. "color": "#00aaaa"
  194. },
  195. "ferry": {
  196. "sign": "<img src='maki:ferry?fill=#ffffff'>",
  197. "zoom": 12,
  198. "color": "#007fff"
  199. }
  200. }
  201. }