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.

172 lines
7.6 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": "4",
  77. "dashArray": "{% if not dirForward or not dirBackward %}27,8{% endif %}",
  78. "dashOffset": "{% if dirBackward %}28{% else %}0{% endif %}",
  79. "lineCap": "{% if not dirForward or not dirBackward %}butt{% else %}round{% endif %}",
  80. "noClip": "{% if not dirForward or not dirBackward %}true{% else %}false{% endif %}",
  81. "opacity": 1,
  82. "text": "{{ refs|join(' · ') }} ",
  83. "textRepeat": "1",
  84. "textOffset": "12",
  85. "textFontWeight": "bold",
  86. "pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}",
  87. "pattern-pixelSize": "9",
  88. "pattern-repeat": "35",
  89. "pattern-offset": "{% if dirBackward %}4{% else %}30.5{% endif %}",
  90. "pattern-polygon": "true",
  91. "pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}",
  92. "pattern-path-width": "0",
  93. "pattern-path-fillOpacity": "1",
  94. "pattern-path-color": "{{ const[network].color }}"
  95. },
  96. "style:hover": {
  97. "pane": "hover",
  98. "width": "4",
  99. "dashArray": "{% if hover == 'forward' or hover == 'backward' %}27,8{% endif %}",
  100. "dashOffset": "{% if hover == 'backward' %}28{% else %}0{% endif %}",
  101. "lineCap": "{% if hover == 'forward' or hover == 'backward' %}butt{% else %}round{% endif %}",
  102. "noClip": "{% if hover == 'forward' or hover == 'backward' %}true{% else %}false{% endif %}",
  103. "color": "black",
  104. "pattern": "{% if hover == 'forward' or hover == 'backward' %}arrowHead{% endif %}",
  105. "pattern-pixelSize": "9",
  106. "pattern-repeat": "35",
  107. "pattern-offset": "{% if hover == 'backward' %}4{% else %}30.5{% endif %}",
  108. "pattern-polygon": "true",
  109. "pattern-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}",
  110. "pattern-path-width": "0",
  111. "pattern-path-fillOpacity": "1",
  112. "pattern-path-color": "black"
  113. },
  114. "style:selected": {
  115. "pane": "selected",
  116. "width": "4",
  117. "dashArray": "{% if selected == 'forward' or selected == 'backward' %}27,8{% endif %}",
  118. "dashOffset": "{% if selected == 'backward' %}28{% else %}0{% endif %}",
  119. "lineCap": "{% if selected == 'forward' or selected == 'backward' %}butt{% else %}round{% endif %}",
  120. "noClip": "{% if selected == 'forward' or selected == 'backward' %}true{% else %}false{% endif %}",
  121. "color": "#3f3f3f",
  122. "pattern": "{% if selected == 'forward' or selected == 'backward' %}arrowHead{% endif %}",
  123. "pattern-pixelSize": "9",
  124. "pattern-repeat": "35",
  125. "pattern-offset": "{% if selected == 'backward' %}4{% else %}30.5{% endif %}",
  126. "pattern-polygon": "true",
  127. "pattern-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}",
  128. "pattern-path-width": "0",
  129. "pattern-path-fillOpacity": "1",
  130. "pattern-path-color": "#3f3f3f"
  131. }
  132. },
  133. "const": {
  134. "icn": {
  135. "color": "#ff0000",
  136. "priority": 0,
  137. "zoom": 6
  138. },
  139. "ncn": {
  140. "color": "#ff00ba",
  141. "priority": 1,
  142. "zoom": 9
  143. },
  144. "rcn": {
  145. "color": "#ba00ff",
  146. "priority": 2,
  147. "zoom": 12
  148. },
  149. "lcn": {
  150. "color": "#0000ff",
  151. "priority": 3,
  152. "zoom": 15
  153. },
  154. "": {
  155. "color": "#007fff",
  156. "priority": 4,
  157. "zoom": 15
  158. }
  159. },
  160. "info": [
  161. "<table>",
  162. "{% for value, data in const %}",
  163. "{% if data.zoom <= map.zoom %}",
  164. " <tr>",
  165. " <td>{{ markerLine({ 'width': 4, color: data.color })|raw }}</td>",
  166. " <td>{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %}</td>",
  167. " </tr>",
  168. "{% endif %}",
  169. "{% endfor %}",
  170. "</table>"
  171. ]
  172. }