Show human powered boat (canoe/kayak/standup paddleboard/etc) routes and amenities.
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.

101 lines
3.3 KiB

  1. type: overpass
  2. name:
  3. en: Paddling Routes
  4. query:
  5. '6': relation[type=route][route~"^(|.*;)canoe(|;.*)$"][network~'^(|.*;)(ipn)(|;.*)$']
  6. '7': relation[type=route][route~"^(|.*;)canoe(|;.*)$"][network~'^(|.*;)(ipn|npn)(|;.*)$']
  7. '8': relation[type=route][route~"^(|.*;)canoe(|;.*)$"][network~'^(|.*;)(ipn|npn|rpn)(|;.*)$']
  8. '10': (relation[type=route][route~"^(|.*;)canoe(|;.*)$"]
  9. members: true
  10. feature:
  11. pre: |-
  12. {% set network = tags.network %}
  13. {% for n in tags.network|split(';') %}
  14. {% if n|matches('pn$') %}{% set network = n %}{% endif %}
  15. {% endfor %}
  16. priority: '{{ const[network].priority|default(4) }}'
  17. description: '{% if network %}{{ tagTrans(''network'', network) }}{% endif %}'
  18. listMarkerSymbol: '{{ markerLine({ ''width'': 4, ''color'': const[network|default('''')].color|default(const[''''].color) })|raw }}'
  19. title: '{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}'
  20. styles: ''
  21. markerSymbol: ''
  22. memberFeature:
  23. pre: |-
  24. {% set priority = 4 %}
  25. {% set network = '' %}
  26. {% set refs = [] %}
  27. {% for master in masters %}
  28. {% set masterNetwork = '' %}
  29. {% for n in master.tags.network|split(';') %}
  30. {% if n|matches('pn$') %}{% set masterNetwork = n %}{% endif %}
  31. {% endfor %}
  32. {% set _p = const[masterNetwork].priority|default(4) %}
  33. {% if _p < priority %}
  34. {% set priority = _p %}
  35. {% set network = masterNetwork %}
  36. {% endif %}
  37. {% if master.tags.ref %}
  38. {% set refs = refs|merge([ master.tags.ref ]) %}
  39. {% endif %}
  40. {% endfor %}
  41. body: |-
  42. <h4>Routes</h4>
  43. <ul class='overpass-layer-list'>
  44. {% for master in masters %}
  45. {% set masterNetwork = '' %}
  46. {% for n in master.tags.network|split(';') %}
  47. {% if n|matches('pn$') %}{% set masterNetwork = n %}{% endif %}
  48. {% endfor %}
  49. <li data-object="{{ master.id }}"><a>
  50. <div class='marker'>
  51. <div class='symbol'>{{ markerLine({ width: 4, color: const[masterNetwork].color|default(const[''].color) })|raw }}</div>
  52. </div>
  53. <div class='content'>
  54. <div class='description'>{{ tagTrans('network', masterNetwork) }}</div>
  55. <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>
  56. </div>
  57. </a></li>
  58. {% endfor %}
  59. </ul>
  60. listExclude: '1'
  61. style:
  62. color: '{{ const[network].color }}'
  63. width: 4
  64. opacity: 1
  65. text: '{{ refs|join('' · '') }} '
  66. textRepeat: '1'
  67. textOffset: '12'
  68. textFontWeight: bold
  69. const:
  70. ipn:
  71. color: '#ff0000'
  72. priority: 0
  73. zoom: 10
  74. npn:
  75. color: '#ff00ba'
  76. priority: 1
  77. zoom: 11
  78. rpn:
  79. color: '#ba00ff'
  80. priority: 2
  81. zoom: 12
  82. lpn:
  83. color: '#0000ff'
  84. priority: 3
  85. zoom: 14
  86. '':
  87. color: '#007fff'
  88. priority: 4
  89. zoom: 14
  90. info: |-
  91. <table>
  92. {% for value, data in const %}
  93. {% if data.zoom <= map.zoom %}
  94. <tr>
  95. <td>{{ markerLine({ 'width': 4, color: data.color })|raw }}</td>
  96. <td>{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %}</td>
  97. </tr>
  98. {% endif %}
  99. {% endfor %}
  100. </table>