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.

331 lines
15 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. {
  2. "type": "overpass",
  3. "name": {
  4. "ca": "Mapa de transport públic",
  5. "cs": "Mapa veřejné dopravy",
  6. "de": "ÖV Karte",
  7. "en": "Public transport map",
  8. "es": "Mapa de transporte público",
  9. "fr": "Carte des transports publics",
  10. "gl": "Mapa de transporte público",
  11. "hu": "Tömegközlekedési térkép",
  12. "it": "Mappa del trasporto pubblico",
  13. "ja": "公共交通地図",
  14. "nb": "Offentlig-transport kart",
  15. "nl": "Openbaar vervoer kaart",
  16. "oc": "Transpòrts publics",
  17. "pl": "Mapa transportu publicznego",
  18. "pt": "Mapa de transporte público",
  19. "pt-br": "Mapa de transporte público",
  20. "ro": "Hartă transport public",
  21. "ru": "Карта общественного транспорта",
  22. "sr": "Мапа јавног превоза",
  23. "tr": "Toplu taşıma haritası"
  24. },
  25. "query": {
  26. "12": "relation[type=route][route~\"^(subway|monorail|ferry|train)$\"];",
  27. "14": [
  28. "(",
  29. "relation[type=route][route~\"^(subway|monorail|aerialway|bus|trolleybus|ferry|train|tram)$\"];",
  30. "relation[type=public_transport][public_transport=stop_area];",
  31. ")"
  32. ]
  33. },
  34. "lists": {
  35. "stops": {
  36. "prefix": "listStops",
  37. "name": {
  38. "ast": "Paraes y estaciones",
  39. "ca": "Parades i Estacions",
  40. "cs": "Zastávky & Stanice",
  41. "de": "Haltestellen",
  42. "el": "Στάσεις & Σταθμοί",
  43. "en": "Stops & Stations",
  44. "es": "Paradas y estaciones",
  45. "fr": "Arrêts et stations",
  46. "gl": "Paraxes e estacións",
  47. "hu": "Megállók és állomások",
  48. "it": "Fermate e stazioni",
  49. "ja": "停留所と駅",
  50. "nb": "Stopp og stasjoner",
  51. "nl": "Haltes en Stations",
  52. "oc": "Arrèsts e Estations",
  53. "pl": "Przystanki i stacje",
  54. "pt": "Paragens e estações",
  55. "pt-br": "Paradas e estações",
  56. "ru": "Остановки и станции",
  57. "sr": "Стајалишта и станице",
  58. "tr": "Duraklar ve İstasyonlar",
  59. "uk": "Зупинки та станції"
  60. }
  61. },
  62. "routes": {
  63. "prefix": "listRoutes",
  64. "name": {
  65. "ca": "Rutes",
  66. "cs": "Trasy",
  67. "de": "Routen",
  68. "en": "Routes",
  69. "es": "Rutas",
  70. "fr": "Lignes",
  71. "gl": "Rotas",
  72. "hu": "Útvonalak",
  73. "it": "Percorsi",
  74. "ja": "ルート",
  75. "nb": "Ruter",
  76. "nl": "Routes",
  77. "oc": "Linhas",
  78. "pl": "Trasy",
  79. "pt": "Rotas",
  80. "pt-br": "Linhas",
  81. "ro": "Rute",
  82. "ru": "Маршруты",
  83. "sr": "Трасе",
  84. "tr": "Rotalar"
  85. }
  86. }
  87. },
  88. "feature": {
  89. "pre": "{% set isStopArea = tags.public_transport == 'stop_area' %}",
  90. "title": [
  91. "{% if tags.ref %}{{ tags.ref }} - {% endif %}",
  92. "",
  93. "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) }}"
  94. ],
  95. "description": "{{ tagTrans('route', tags.route) }}",
  96. "body": [
  97. "<h4>{{ repoTrans('category:pt:stops') }}</h4><ul class='fa-ul'>",
  98. "{% for member in members %}",
  99. "{% 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' %}",
  100. "<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>",
  101. "{% endif %}",
  102. "{% endfor %}",
  103. "</ul>"
  104. ],
  105. "markerSymbol": "",
  106. "styles": "",
  107. "style:hover": {
  108. "width": "0"
  109. },
  110. "style:selected": {
  111. "width": "0"
  112. },
  113. "listStopsExclude": "true",
  114. "listRoutesMarkerSign": "{{ const[tags.route].sign|raw }}",
  115. "listRoutesMarkerSymbol": "{{ markerCircle({fillColor:const[tags.route].color})|raw }}",
  116. "listRoutesExclude": "{{ isStopArea }}"
  117. },
  118. "members": true,
  119. "memberFeature": {
  120. "pre": [
  121. "{% set stopName = '' %}",
  122. "{% set isStop = false %}",
  123. "{% set stopCount = 0 %}",
  124. "{% 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 %}",
  125. "{% set isWay = false %}",
  126. "{% set aRoute = null %}",
  127. "{% set refs = [] %}",
  128. "{% set dirForward = false %}",
  129. "{% set dirBackward = false %}",
  130. "{% set hover = false %}",
  131. "{% set selected = false %}",
  132. "{% for master in masters %}",
  133. " {% if master.tags.public_transport == 'stop_area' %}",
  134. " {% set stopName = master.tags.name %}",
  135. " {% else %}",
  136. " {% if master.role|matches('^(|.*stop)$') and isStop %}",
  137. " {% set isStop = true %}",
  138. " {% set stopCount = stopCount + 1 %}",
  139. " {% elseif master.role|matches('^(|forward|backward)$') and type == 'way' %}",
  140. " {% set isWay = true %}",
  141. " {% endif %}",
  142. " {% set aRoute = master %}",
  143. "",
  144. " {% if master.tags.ref %}",
  145. " {% set refs = refs|merge([ master.tags.ref ]) %}",
  146. " {% endif %}",
  147. " {% if master.dir == 'forward' %}{% set dirForward = true %}",
  148. " {% elseif master.dir == 'backward' %}{% set dirBackward = true %}",
  149. " {% else %}{% set dirForward = true %}{% set dirBackward = true %}",
  150. " {% endif %}",
  151. " {% endif %}",
  152. "",
  153. " {% if master.flags.hover %}{% set hover = master.dir|default('both') %}{% endif %}",
  154. " {% if master.flags.selected %}{% set selected = master.dir|default('both') %}{% endif %}",
  155. "{% endfor %}",
  156. "",
  157. "{% set refs = refs|unique|natsort({ insensitive: true }) %}",
  158. "{% set color = const[aRoute.tags.route].color %}"
  159. ],
  160. "title": "{% if isStop %}{{ tags.name|default(stopName)|default(id) }}{% endif %}",
  161. "body": [
  162. "<h4>{{ repoTrans('category:pt:routes') }}</h4>",
  163. "<ul class='overpass-layer-list'>",
  164. "{% for master in masters %}",
  165. " {% if master.tags.public_transport != 'stop_area' %}",
  166. " <li data-object=\"{{ master.id }}\">",
  167. " <a href='#pt/{{ master.id }}'>",
  168. " <div class='marker'><div class='symbol'>{{ markerCircle({fillColor:const[master.tags.route].color})|raw }}</div><div class='sign'>{{ const[master.tags.route].sign|raw }}</div></div>",
  169. " <div class='content'>",
  170. " <div class='description'>{{ tagTrans('route', master.tags.route) }}</div>",
  171. " <div 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 %}</div>",
  172. " </div>",
  173. " </a>",
  174. " </li>",
  175. " {% endif %}",
  176. "{% endfor %}",
  177. "</ul>"
  178. ],
  179. "markerSign": " ",
  180. "markerSymbol": "{% if isStop and stopCount > 0 %}{% if hover or selected %}{{ markerPointer({ })|raw }}{% endif %}{% endif %}",
  181. "styles": "{% if isStop and stopCount > 0 %}stop{% elseif isWay %}casing,way{% if hover %},hover{% endif %}{% if selected %},selected{% endif %}{% endif %}",
  182. "style:hover": {
  183. "pane": "hover",
  184. "width": "4",
  185. "color": "black",
  186. "lineCap": "{% if hover == 'forward' or hover == 'backward' %}butt{% else %}round{% endif %}",
  187. "dashArray": "{% if hover == 'forward' or hover == 'backward' %}27,8{% endif %}",
  188. "dashOffset": "{% if hover == 'backward' %}28{% else %}0{% endif %}",
  189. "noClip": "{% if hover == 'forward' or hover == 'backward' %}true{% else %}false{% endif %}",
  190. "pattern": "{% if hover == 'forward' or hover == 'backward' %}arrowHead{% endif %}",
  191. "pattern-offset": "{% if hover == 'backward' %}4{% else %}30.5{% endif %}",
  192. "pattern-repeat": "35",
  193. "pattern-polygon": "true",
  194. "pattern-pixelSize": "9",
  195. "pattern-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}",
  196. "pattern-path-width": "0",
  197. "pattern-path-color": "black",
  198. "pattern-path-fillOpacity": "1"
  199. },
  200. "style:selected": {
  201. "pane": "selected",
  202. "width": "4",
  203. "color": "#3f3f3f",
  204. "lineCap": "{% if selected == 'forward' or selected == 'backward' %}butt{% else %}round{% endif %}",
  205. "dashArray": "{% if selected == 'forward' or selected == 'backward' %}27,8{% endif %}",
  206. "dashOffset": "{% if selected == 'backward' %}28{% else %}0{% endif %}",
  207. "noClip": "{% if selected == 'forward' or selected == 'backward' %}true{% else %}false{% endif %}",
  208. "pattern": "{% if selected == 'forward' or selected == 'backward' %}arrowHead{% endif %}",
  209. "pattern-offset": "{% if selected == 'backward' %}4{% else %}30.5{% endif %}",
  210. "pattern-repeat": "35",
  211. "pattern-polygon": "true",
  212. "pattern-pixelSize": "9",
  213. "pattern-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}",
  214. "pattern-path-width": "0",
  215. "pattern-path-color": "#3f3f3f",
  216. "pattern-path-fillOpacity": "1"
  217. },
  218. "listStopsMarkerSign": null,
  219. "listStopsMarkerSymbol": "{{ markerCircle({ width: 5, color: color, fillOpacity: '1', radius: 3 })|raw }}",
  220. "listStopsExclude": "{{ not isStop or stopCount == 0 }}",
  221. "listStopsTitle": [
  222. "{% if tags %}{{ tags.name|default(stopName)|default(trans('unknown')) }}{% else %}<li>{{ trans('loading') }}</li>{% endif %}<br/>",
  223. "<i>{{ refs|join(' · ') }}</i>"
  224. ],
  225. "description": [
  226. "{% set stopTypes = [] %}",
  227. "{% if tags.railway in ['tram_stop'] %}{% set stopTypes = stopTypes|merge([ tagTrans('railway', tags.railway) ]) %}{% endif %}",
  228. "{% if tags.highway in ['bus_stop'] %}{% set stopTypes = stopTypes|merge([ tagTrans('highway', tags.highway) ]) %}{% endif %}",
  229. "{% if stopTypes|length %}{{ enumerate(stopTypes) }}{% elseif isStop %}{{ tagTrans('public_transport', 'stop_position') }}{% else %}{{ keyTrans('route') }}{% endif %}"
  230. ],
  231. "listRoutesExclude": "true",
  232. "style:stop": {
  233. "width": "4",
  234. "color": "{{ color|default('#ff0000') }}",
  235. "radius": "3",
  236. "zIndex": "1"
  237. },
  238. "style:way": {
  239. "width": "4",
  240. "color": "{{ color|default('#ff0000') }}",
  241. "opacity": "1",
  242. "lineCap": "{% if not dirForward or not dirBackward %}butt{% else %}round{% endif %}",
  243. "dashArray": "{% if not dirForward or not dirBackward %}27,8{% endif %}",
  244. "dashOffset": "{% if dirBackward %}28{% else %}0{% endif %}",
  245. "noClip": "{% if not dirForward or not dirBackward %}true{% else %}false{% endif %}",
  246. "text1": "{{ refs|join(' · ') }} ",
  247. "textRepeat": "1",
  248. "textOffset": "12",
  249. "pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}",
  250. "pattern-offset": "{% if dirBackward %}4{% else %}30.5{% endif %}",
  251. "pattern-repeat": "35",
  252. "pattern-polygon": "true",
  253. "pattern-pixelSize": "9",
  254. "pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}",
  255. "pattern-path-width": "0",
  256. "pattern-path-color": "{{ color|default('#ff0000') }}",
  257. "pattern-path-fillOpacity": "1",
  258. "textFontWeight": "bold"
  259. }
  260. },
  261. "info": [
  262. "<table>",
  263. "{% for value, data in const %}",
  264. "{% if data.zoom <= map.zoom %}",
  265. " <tr>",
  266. " <td>{{ markerCircle({fillColor:data.color})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
  267. " <td>{{ tagTrans('route', value) }}</td>",
  268. " </tr>",
  269. "{% endif %}",
  270. "{% endfor %}",
  271. "</table>"
  272. ],
  273. "const": {
  274. "train": {
  275. "sign": "<img data-src='maki:rail?fill=#ffffff'>",
  276. "zoom": 12,
  277. "color": "#00007f"
  278. },
  279. "subway": {
  280. "sign": "<img data-src='maki:rail-metro?fill=#ffffff'>",
  281. "zoom": 12,
  282. "color": "#0000ff"
  283. },
  284. "monorail": {
  285. "sign": "<span style='color: #ffffff'>M</span>",
  286. "zoom": 12,
  287. "color": "#006f8f"
  288. },
  289. "tram": {
  290. "sign": "<img data-src='maki:rail-light?fill=#ffffff'>",
  291. "zoom": 12,
  292. "color": "#7f007f"
  293. },
  294. "bus": {
  295. "sign": "<img data-src='maki:bus?fill=#ffffff'>",
  296. "zoom": 12,
  297. "color": "#af0000"
  298. },
  299. "trolleybus": {
  300. "sign": "<img data-src='maki:bus?fill=#ffffff'>",
  301. "zoom": 12,
  302. "color": "#af3f00"
  303. },
  304. "aerialway": {
  305. "sign": "<img data-src='maki:aerialway?fill=#ffffff'>",
  306. "zoom": 12,
  307. "color": "#00aaaa"
  308. },
  309. "ferry": {
  310. "sign": "<img data-src='maki:ferry?fill=#ffffff'>",
  311. "zoom": 12,
  312. "color": "#007fff"
  313. }
  314. },
  315. "filter": {
  316. "route": {
  317. "type": "select",
  318. "show_default": "true",
  319. "valueName": "{{ tagTrans('route', value) }}",
  320. "values": [
  321. "aerialway",
  322. "bus",
  323. "ferry",
  324. "subway",
  325. "train",
  326. "tram",
  327. "trolleybus"
  328. ]
  329. }
  330. }
  331. }