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.

137 lines
5.2 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "ca": "Rutes Excursionistes",
  5. "cs": "Turistické trasy",
  6. "de": "Wanderrouten",
  7. "en": "Hiking routes",
  8. "es": "Rutas de senderismo",
  9. "fr": "Itinéraires pédestres",
  10. "gl": "Rotas sendeiristas",
  11. "hu": "Turistautak",
  12. "it": "Percorsi escursionistici",
  13. "ja": "ハイキングルート",
  14. "nb": "Gåruter",
  15. "nl": "Wandelroutes",
  16. "oc": "Itineraris per escorregudas",
  17. "pl": "Trasy turystyczne",
  18. "pt": "Rotas de caminhada",
  19. "pt-br": "Rotas de caminhada",
  20. "ro": "Trasee de drumeție",
  21. "ru": "Туристические маршруты",
  22. "sr": "Трасе за планинарење",
  23. "tr": "Yürüyüş Rotaları"
  24. },
  25. "query": {
  26. "10": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"][network~\"^(|.*;)(iwn)(|;.*)$\"]",
  27. "11": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"][network~\"^(|.*;)(iwn|nwn)(|;.*)$\"]",
  28. "12": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"][network~\"^(|.*;)(iwn|nwn|rwn)(|;.*)$\"]",
  29. "14": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"]"
  30. },
  31. "members": true,
  32. "feature": {
  33. "pre": [
  34. "{% set network = tags.network %}",
  35. "{% for n in tags.network|split(';') %}",
  36. "{% if n|matches('wn$') %}{% set network = n %}{% endif %}",
  37. "{% endfor %}"
  38. ],
  39. "priority": "{{ const[network].priority|default(4) }}",
  40. "description": "{% if network %}{{ tagTrans('network', network) }}{% endif %}",
  41. "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[network|default('')].color|default(const[''].color) })|raw }}",
  42. "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}",
  43. "styles": "",
  44. "markerSymbol": ""
  45. },
  46. "memberFeature": {
  47. "pre": [
  48. "{% set priority = 4 %}",
  49. "{% set network = '' %}",
  50. "{% set refs = [] %}",
  51. "",
  52. "{% for master in masters %}",
  53. " {% set masterNetwork = '' %}",
  54. " {% for n in master.tags.network|split(';') %}",
  55. " {% if n|matches('wn$') %}{% set masterNetwork = n %}{% endif %}",
  56. " {% endfor %}",
  57. " {% set _p = const[masterNetwork].priority|default(4) %}",
  58. " {% if _p < priority %}",
  59. " {% set priority = _p %}",
  60. " {% set network = masterNetwork %}",
  61. " {% endif %}",
  62. " {% if master.tags.ref %}",
  63. " {% set refs = refs|merge([ master.tags.ref ]) %}",
  64. " {% endif %}",
  65. "{% endfor %}"
  66. ],
  67. "body": [
  68. "<h4>Routes</h4>",
  69. "<ul class='overpass-layer-list'>",
  70. "{% for master in masters %}",
  71. " {% set masterNetwork = '' %}",
  72. " {% for n in master.tags.network|split(';') %}",
  73. " {% if n|matches('wn$') %}{% set masterNetwork = n %}{% endif %}",
  74. " {% endfor %}",
  75. " <li data-object=\"{{ master.id }}\"><a>",
  76. " <div class='marker'>",
  77. " <div class='symbol'>{{ markerLine({ width: 4, color: const[masterNetwork].color|default(const[''].color) })|raw }}</div>",
  78. " </div>",
  79. " <div class='content'>",
  80. " <div class='description'>{{ tagTrans('network', masterNetwork) }}</div>",
  81. " <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 }}{% endif %}</div>",
  82. " </div>",
  83. " </a></li>",
  84. "{% endfor %}",
  85. "</ul>"
  86. ],
  87. "listExclude": "1",
  88. "style": {
  89. "color": "{{ const[network].color }}",
  90. "width": 4,
  91. "opacity": 1,
  92. "text": "{{ refs|join(' · ') }} ",
  93. "textRepeat": "1",
  94. "textOffset": "12",
  95. "textFontWeight": "bold"
  96. }
  97. },
  98. "const": {
  99. "iwn": {
  100. "color": "#ff0000",
  101. "priority": 0,
  102. "zoom": 10
  103. },
  104. "nwn": {
  105. "color": "#ff00ba",
  106. "priority": 1,
  107. "zoom": 11
  108. },
  109. "rwn": {
  110. "color": "#ba00ff",
  111. "priority": 2,
  112. "zoom": 12
  113. },
  114. "lwn": {
  115. "color": "#0000ff",
  116. "priority": 3,
  117. "zoom": 14
  118. },
  119. "": {
  120. "color": "#007fff",
  121. "priority": 4,
  122. "zoom": 14
  123. }
  124. },
  125. "info": [
  126. "<table>",
  127. "{% for value, data in const %}",
  128. "{% if data.zoom <= map.zoom %}",
  129. " <tr>",
  130. " <td>{{ markerLine({ 'width': 4, color: data.color })|raw }}</td>",
  131. " <td>{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %}</td>",
  132. " </tr>",
  133. "{% endif %}",
  134. "{% endfor %}",
  135. "</table>"
  136. ]
  137. }