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.

111 lines
4.1 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 _p = const[master.tags.network].priority|default(4) %}",
  40. " {% if _p < priority %}",
  41. " {% set priority = _p %}",
  42. " {% set network = master.tags.network %}",
  43. " {% endif %}",
  44. " {% if master.tags.ref %}",
  45. " {% set refs = refs|merge([ master.tags.ref ]) %}",
  46. " {% endif %}",
  47. "{% endfor %}"
  48. ],
  49. "body": [
  50. "<h4>Routes</h4>",
  51. "<ul class='overpass-layer-list'>",
  52. "{% for master in masters %}",
  53. " <li data-object=\"{{ master.id }}\">",
  54. " <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: const[master.tags.network].color|default(const[''].color) })|raw }}</div></span>",
  55. " <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>",
  56. " <span class='description'>{{ tagTrans('network', master.tags.network) }}</span>",
  57. " </li>",
  58. "{% endfor %}",
  59. "</ul>"
  60. ],
  61. "listExclude": "1",
  62. "style": {
  63. "color": "{{ const[network].color }}",
  64. "width": 4,
  65. "opacity": 1,
  66. "text": "{{ refs|join(' · ') }} ",
  67. "textRepeat": "1",
  68. "textOffset": "12",
  69. "textFontWeight": "bold"
  70. }
  71. },
  72. "const": {
  73. "iwn": {
  74. "color": "#ff0000",
  75. "priority": 0,
  76. "zoom": 10
  77. },
  78. "nwn": {
  79. "color": "#ff00ba",
  80. "priority": 1,
  81. "zoom": 11
  82. },
  83. "rwn": {
  84. "color": "#ba00ff",
  85. "priority": 2,
  86. "zoom": 12
  87. },
  88. "lwn": {
  89. "color": "#0000ff",
  90. "priority": 3,
  91. "zoom": 14
  92. },
  93. "": {
  94. "color": "#007fff",
  95. "priority": 4,
  96. "zoom": 14
  97. }
  98. },
  99. "info": [
  100. "<table>",
  101. "{% for value, data in const %}",
  102. "{% if data.zoom <= map.zoom %}",
  103. " <tr>",
  104. " <td>{{ markerLine({ 'width': 4, color: data.color })|raw }}</td>",
  105. " <td>{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %}</td>",
  106. " </tr>",
  107. "{% endif %}",
  108. "{% endfor %}",
  109. "</table>"
  110. ]
  111. }