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.

93 lines
3.0 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "de": "Wanderrouten",
  5. "en": "Hiking routes",
  6. "fr": "Itinéraires pédestres",
  7. "pt": "Rotas de caminhada",
  8. "pt-br": "Rotas de Caminhada"
  9. },
  10. "query": {
  11. "10": "relation[type=route][route=hiking][network~\"^(iwn)$\"]",
  12. "11": "relation[type=route][route=hiking][network~\"^(iwn|nwn)$\"]",
  13. "12": "relation[type=route][route=hiking][network~\"^(iwn|nwn|rwn)$\"]",
  14. "14": "relation[type=route][route=hiking]"
  15. },
  16. "members": true,
  17. "feature": {
  18. "priority": "{{ {iwn:0,nwn:1,rwn:2,lwn:3}[tags.network]|default(4) }}",
  19. "description": "{% if tags.network %}{{ tagTrans('network', tags.network) }}{% endif %}",
  20. "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network|default('')].color })|raw }}",
  21. "styles": ""
  22. },
  23. "memberFeature": {
  24. "pre": [
  25. "{% set priority = 4 %}",
  26. "{% set network = '' %}",
  27. "{% set refs = [] %}",
  28. "",
  29. "{% for master in masters %}",
  30. " {% set _p = {iwn:0,nwn:1,rwn:2,lwn:3}[master.tags.network]|default(4) %}",
  31. " {% if _p < priority %}",
  32. " {% set priority = _p %}",
  33. " {% set network = master.tags.network %}",
  34. " {% endif %}",
  35. " {% if master.tags.ref %}",
  36. " {% set refs = refs|merge([ master.tags.ref ]) %}",
  37. " {% endif %}",
  38. "{% endfor %}"
  39. ],
  40. "body": [
  41. "<h4>Routes</h4>",
  42. "<ul>",
  43. "{% for master in masters %}",
  44. " <li data-object=\"{{ master.id }}\"><b>{{ master.tags.name|default(master.tags.ref) }}</b>{% if master.tags.network %} <i>{{ tagTrans('network', master.tags.network) }}</i>{% endif %}</li>",
  45. "{% endfor %}",
  46. "</ul>"
  47. ],
  48. "listExclude": "1",
  49. "style": {
  50. "color": "{{ const[network].color }}",
  51. "width": 4,
  52. "opacity": 1,
  53. "text": "{{ refs|join(' ') }} ",
  54. "textRepeat": "1",
  55. "textOffset": "12",
  56. "textFontWeight": "bold"
  57. }
  58. },
  59. "const": {
  60. "iwn": {
  61. "color": "#ff0000",
  62. "zoom": 10
  63. },
  64. "nwn": {
  65. "color": "#ff00ba",
  66. "zoom": 11
  67. },
  68. "rwn": {
  69. "color": "#ba00ff",
  70. "zoom": 12
  71. },
  72. "lwn": {
  73. "color": "#0000ff",
  74. "zoom": 14
  75. },
  76. "": {
  77. "color": "#007fff",
  78. "zoom": 14
  79. }
  80. },
  81. "info": [
  82. "<table>",
  83. "{% for value, data in const %}",
  84. "{% if data.zoom <= map.zoom %}",
  85. " <tr>",
  86. " <td>{{ markerLine({ 'width': 4, color: data.color })|raw }}</td>",
  87. " <td>{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %}</td>",
  88. " </tr>",
  89. "{% endif %}",
  90. "{% endfor %}",
  91. "</table>"
  92. ]
  93. }