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.

127 lines
4.4 KiB

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. "name_routes": {
  23. "de": "Routen",
  24. "en": "Routes",
  25. "fr": "Lignes",
  26. "pt": "Rotas",
  27. "pt-br": "Rotas"
  28. },
  29. "query": {
  30. "12": "relation[type=route][route~\"^(subway|monorail|ferry|train)$\"];",
  31. "14": "relation[type=route][route~\"^(subway|monorail|aerialway|bus|trolleybus|ferry|train|tram)$\"];"
  32. },
  33. "members": true,
  34. "feature": {
  35. "styles": "",
  36. "title": [
  37. "{% if tags.ref %}{{ tags.ref }} - {% endif %}",
  38. "",
  39. "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) | default(trans('unnamed')) }}"
  40. ],
  41. "description": "{{ tagTrans('route', tags.route) }}",
  42. "body": [
  43. "<h4>Stops</h4>",
  44. "{% for member in members %}",
  45. "{% if member.role|slice(-4) == 'stop' %}",
  46. "<div object='{{ member.id }}' sublayer='member'><b>{{ member.tags.name }}</b></div>",
  47. "{% endif %}",
  48. "{% endfor %}"
  49. ],
  50. "listMarkerSign": "{{ const[tags.route].sign|raw }}",
  51. "markerSymbol": null,
  52. "listMarkerSymbol": "{{ markerCircle({fillColor:const[tags.route].color})|raw }}"
  53. },
  54. "memberFeature": {
  55. "listMarkerSymbol": "{{ markerCircle({})|raw }}",
  56. "style": {
  57. "color": [
  58. "{% set master = masters[0] %}",
  59. "{{ const[master.tags.route].color|default('#ff0000') }}"
  60. ],
  61. "width": "{% if map.zoom>=15 %}5{% else %}3{% endif %}"
  62. },
  63. "title": "{% if tags.public_transport == 'stop_position' %}{{ tags.name }}{% endif %}",
  64. "listStopsTitle": "{{ tags.name }}: {% for master in masters %}{{ master.tags.ref }} {% endfor %}",
  65. "body": [
  66. "{% for master in masters %}",
  67. " '<div object=\"{{ master.id }}\"><b>{{ master.tags.name|default(master.tags.ref) }}</b> ({{ master.id }})</div>",
  68. "{% endfor %}"
  69. ],
  70. "listRoutesExclude": "true",
  71. "listStopsExclude": "{% set isStop = 0 %}{% for master in masters %}{% if master.role|slice(-4) == 'stop' %}{% set isStop = 1 %}{% endif %}{% endfor %}{{ not isStop }}"
  72. },
  73. "info": [
  74. "<table>",
  75. "{% for value, data in const %}",
  76. "{% if data.zoom <= map.zoom %}",
  77. " <tr>",
  78. " <td>{{ markerCircle({fillColor:data.color})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
  79. " <td>{{ tagTrans('route', value) }}</td>",
  80. " </tr>",
  81. "{% endif %}",
  82. "{% endfor %}",
  83. "</table>"
  84. ],
  85. "const": {
  86. "train": {
  87. "sign": "<img src='maki:rail?fill=#ffffff'>",
  88. "zoom": 12,
  89. "color": "#202020"
  90. },
  91. "subway": {
  92. "sign": "<img src='maki:rail-metro?fill=#ffffff'>",
  93. "zoom": 12,
  94. "color": "#00007f"
  95. },
  96. "monorail": {
  97. "sign": "<span style='color: #ffffff'>M</span>",
  98. "zoom": 12,
  99. "color": "#006f8f"
  100. },
  101. "tram": {
  102. "sign": "<img src='maki:rail-light?fill=#ffffff'>",
  103. "zoom": 12,
  104. "color": "#7f007f"
  105. },
  106. "bus": {
  107. "sign": "<img src='maki:bus?fill=#ffffff'>",
  108. "zoom": 12,
  109. "color": "#af0000"
  110. },
  111. "trolleybus": {
  112. "sign": "<img src='maki:bus?fill=#ffffff'>",
  113. "zoom": 12,
  114. "color": "#af3f00"
  115. },
  116. "aerialway": {
  117. "sign": "<img src='maki:aerialway?fill=#ffffff'>",
  118. "zoom": 12,
  119. "color": "#00aaaa"
  120. },
  121. "ferry": {
  122. "sign": "<img src='maki:ferry?fill=#ffffff'>",
  123. "zoom": 12,
  124. "color": "#007fff"
  125. }
  126. }
  127. }