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.

100 lines
3.4 KiB

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