Main categories of OpenStreetBrowser with support for whitewater
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.

119 lines
4.5 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "de": "Wanderrouten",
  5. "en": "Hiking routes",
  6. "fr": "Itinéraires pédestres",
  7. "hu": "Turistautak",
  8. "pt": "Rotas de caminhada",
  9. "pt-br": "Rotas de caminhada"
  10. },
  11. "query": {
  12. "10": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"][network~\"^(|.*;)(iwn)(|;.*)$\"]",
  13. "11": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"][network~\"^(|.*;)(iwn|nwn)(|;.*)$\"]",
  14. "12": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"][network~\"^(|.*;)(iwn|nwn|rwn)(|;.*)$\"]",
  15. "14": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"]"
  16. },
  17. "members": true,
  18. "feature": {
  19. "pre": [
  20. "{% set network = tags.network %}",
  21. "{% for n in tags.network|split(';') %}",
  22. "{% if n|matches('wn$') %}{% set network = n %}{% endif %}",
  23. "{% endfor %}"
  24. ],
  25. "priority": "{{ const[network].priority|default(4) }}",
  26. "description": "{% if network %}{{ tagTrans('network', network) }}{% endif %}",
  27. "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[network|default('')].color|default(const[''].color) })|raw }}",
  28. "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}",
  29. "styles": "",
  30. "markerSymbol": ""
  31. },
  32. "memberFeature": {
  33. "pre": [
  34. "{% set priority = 4 %}",
  35. "{% set network = '' %}",
  36. "{% set refs = [] %}",
  37. "",
  38. "{% for master in masters %}",
  39. " {% set masterNetwork = '' %}",
  40. " {% for n in master.tags.network|split(';') %}",
  41. " {% if n|matches('wn$') %}{% set masterNetwork = n %}{% endif %}",
  42. " {% endfor %}",
  43. " {% set _p = const[masterNetwork].priority|default(4) %}",
  44. " {% if _p < priority %}",
  45. " {% set priority = _p %}",
  46. " {% set network = masterNetwork %}",
  47. " {% endif %}",
  48. " {% if master.tags.ref %}",
  49. " {% set refs = refs|merge([ master.tags.ref ]) %}",
  50. " {% endif %}",
  51. "{% endfor %}"
  52. ],
  53. "body": [
  54. "<h4>Routes</h4>",
  55. "<ul class='overpass-layer-list'>",
  56. "{% for master in masters %}",
  57. " {% set masterNetwork = '' %}",
  58. " {% for n in master.tags.network|split(';') %}",
  59. " {% if n|matches('wn$') %}{% set masterNetwork = n %}{% endif %}",
  60. " {% endfor %}",
  61. " <li data-object=\"{{ master.id }}\">",
  62. " <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: const[masterNetwork].color|default(const[''].color) })|raw }}</div></span>",
  63. " <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 }}{% endif %}</span>",
  64. " <span class='description'>{{ tagTrans('network', masterNetwork) }}</span>",
  65. " </li>",
  66. "{% endfor %}",
  67. "</ul>"
  68. ],
  69. "listExclude": "1",
  70. "style": {
  71. "color": "{{ const[network].color }}",
  72. "width": 4,
  73. "opacity": 1,
  74. "text": "{{ refs|join(' · ') }} ",
  75. "textRepeat": "1",
  76. "textOffset": "12",
  77. "textFontWeight": "bold"
  78. }
  79. },
  80. "const": {
  81. "iwn": {
  82. "color": "#ff0000",
  83. "priority": 0,
  84. "zoom": 10
  85. },
  86. "nwn": {
  87. "color": "#ff00ba",
  88. "priority": 1,
  89. "zoom": 11
  90. },
  91. "rwn": {
  92. "color": "#ba00ff",
  93. "priority": 2,
  94. "zoom": 12
  95. },
  96. "lwn": {
  97. "color": "#0000ff",
  98. "priority": 3,
  99. "zoom": 14
  100. },
  101. "": {
  102. "color": "#007fff",
  103. "priority": 4,
  104. "zoom": 14
  105. }
  106. },
  107. "info": [
  108. "<table>",
  109. "{% for value, data in const %}",
  110. "{% if data.zoom <= map.zoom %}",
  111. " <tr>",
  112. " <td>{{ markerLine({ 'width': 4, color: data.color })|raw }}</td>",
  113. " <td>{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %}</td>",
  114. " </tr>",
  115. "{% endif %}",
  116. "{% endfor %}",
  117. "</table>"
  118. ]
  119. }