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.

154 lines
6.3 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "de": "Radrouten",
  5. "en": "Cycle Routes",
  6. "fr": "Itinéraires vélo",
  7. "hu": "Kerékpáros útvonalak",
  8. "pt": "Ciclovias",
  9. "pt-br": "Ciclorrotas"
  10. },
  11. "query": {
  12. "6": "relation[type=route][route=bicycle][network~'^(icn)$']",
  13. "9": "relation[type=route][route=bicycle][network~'^(icn|ncn)$']",
  14. "12": "relation[type=route][route=bicycle][network~'^(icn|ncn|rcn)$']",
  15. "15": "relation[type=route][route=bicycle]"
  16. },
  17. "members": true,
  18. "feature": {
  19. "priority": "{{ const[tags.network].priority|default(4) }}",
  20. "description": "{{ tagTrans('network', tags.network) }}",
  21. "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network].color|default(const[''].color) })|raw }}",
  22. "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}",
  23. "styles": "",
  24. "style:hover": {
  25. "width": 0
  26. },
  27. "style:selected": {
  28. "width": 0
  29. },
  30. "markerSymbol": ""
  31. },
  32. "memberFeature": {
  33. "pre": [
  34. "{% set priority = 4 %}",
  35. "{% set network = '' %}",
  36. "{% set refs = [] %}",
  37. "{% set dirForward = false %}",
  38. "{% set dirBackward = false %}",
  39. "{% set hover = false %}",
  40. "{% set selected = false %}",
  41. "",
  42. "{% for master in masters %}",
  43. " {% set _p = const[master.tags.network].priority|default(4) %}",
  44. " {% if _p < priority %}",
  45. " {% set priority = _p %}",
  46. " {% set network = master.tags.network %}",
  47. " {% endif %}",
  48. " {% if master.tags.ref %}",
  49. " {% set refs = refs|merge([ master.tags.ref ]) %}",
  50. " {% endif %}",
  51. " {% if master.role == 'forward' %}{% set dirForward = true %}",
  52. " {% elseif master.role == 'backward' %}{% set dirBackward = true %}",
  53. " {% else %}{% set dirForward = true %}{% set dirBackward = true %}",
  54. " {% endif %}",
  55. " {% if master.flags.hover %}{% set hover = master.role|default('both') %}{% endif %}",
  56. " {% if master.flags.selected %}{% set selected = master.role|default('both') %}{% endif %}",
  57. "{% endfor %}"
  58. ],
  59. "title": "",
  60. "body": [
  61. "<h4>Routes</h4>",
  62. "<ul class='overpass-layer-list'>",
  63. "{% for master in masters %}",
  64. " <li data-object=\"{{ master.id }}\">",
  65. " <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: const[master.tags.network].color|default(const[''].color) })|raw }}</div></span>",
  66. " <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 }}{% else %}{{ trans('unnamed') }}{% endif %}</span>",
  67. " <span class='description'>{{ tagTrans('network', master.tags.network) }}</span>",
  68. " </li>",
  69. "{% endfor %}",
  70. "</ul>"
  71. ],
  72. "listExclude": "1",
  73. "styles": "default{% if hover %},hover{% endif %}{% if selected %},selected{% endif %}",
  74. "style": {
  75. "color": "{{ const[network].color }}",
  76. "width": "{% if not dirForward or not dirBackward %}0{% else %}4{% endif %}",
  77. "opacity": 1,
  78. "text": "{{ refs|join(' · ') }} ",
  79. "textRepeat": "1",
  80. "textOffset": "12",
  81. "textFontWeight": "bold",
  82. "pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}",
  83. "pattern-pixelSize": "4",
  84. "pattern-repeat": "7",
  85. "pattern-polygon": "",
  86. "pattern-path-weight": "2",
  87. "pattern-path-color": "{{ const[network].color }}",
  88. "pattern-path-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}"
  89. },
  90. "style:hover": {
  91. "pane": "hover",
  92. "width": "{% if hover == 'forward' or hover == 'backward' %}0{% else %}4{% endif %}",
  93. "color": "black",
  94. "pattern": "{% if hover == 'forward' or hover == 'backward' %}arrowHead{% endif %}",
  95. "pattern-pixelSize": "4",
  96. "pattern-repeat": "7",
  97. "pattern-polygon": "",
  98. "pattern-path-weight": "2",
  99. "pattern-path-color": "black",
  100. "pattern-path-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}"
  101. },
  102. "style:selected": {
  103. "pane": "selected",
  104. "width": "{% if selected == 'forward' or selected == 'backward' %}0{% else %}3{% endif %}",
  105. "color": "#3f3f3f",
  106. "pattern": "{% if selected == 'forward' or selected == 'backward' %}arrowHead{% endif %}",
  107. "pattern-pixelSize": "4",
  108. "pattern-repeat": "7",
  109. "pattern-polygon": "",
  110. "pattern-path-weight": "2",
  111. "pattern-path-color": "#3f3f3f",
  112. "pattern-path-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}"
  113. }
  114. },
  115. "const": {
  116. "icn": {
  117. "color": "#ff0000",
  118. "priority": 0,
  119. "zoom": 6
  120. },
  121. "ncn": {
  122. "color": "#ff00ba",
  123. "priority": 1,
  124. "zoom": 9
  125. },
  126. "rcn": {
  127. "color": "#ba00ff",
  128. "priority": 2,
  129. "zoom": 12
  130. },
  131. "lcn": {
  132. "color": "#0000ff",
  133. "priority": 3,
  134. "zoom": 15
  135. },
  136. "": {
  137. "color": "#007fff",
  138. "priority": 4,
  139. "zoom": 15
  140. }
  141. },
  142. "info": [
  143. "<table>",
  144. "{% for value, data in const %}",
  145. "{% if data.zoom <= map.zoom %}",
  146. " <tr>",
  147. " <td>{{ markerLine({ 'width': 4, color: data.color })|raw }}</td>",
  148. " <td>{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %}</td>",
  149. " </tr>",
  150. "{% endif %}",
  151. "{% endfor %}",
  152. "</table>"
  153. ]
  154. }