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.

196 lines
8.1 KiB

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