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. "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}",
  20. "description": "{{ tagTrans('network', tags.network) }}",
  21. "markerSymbol": "",
  22. "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network].color|default(const[''].color) })|raw }}",
  23. "priority": "{{ const[tags.network].priority|default(4) }}",
  24. "styles": "",
  25. "style:hover": {
  26. "width": "0"
  27. },
  28. "style:selected": {
  29. "width": "0"
  30. }
  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. "width": "4",
  76. "color": "{{ const[network].color }}",
  77. "opacity": "1",
  78. "lineCap": "{% if not dirForward or not dirBackward %}butt{% else %}round{% endif %}",
  79. "dashArray": "{% if not dirForward or not dirBackward %}27,8{% endif %}",
  80. "dashOffset": "{% if dirBackward %}28{% else %}0{% endif %}",
  81. "noClip": "{% if not dirForward or not dirBackward %}true{% else %}false{% endif %}",
  82. "text": "{{ refs|join(' · ') }} ",
  83. "textRepeat": "1",
  84. "textOffset": "12",
  85. "pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}",
  86. "pattern-offset": "{% if dirBackward %}4{% else %}30.5{% endif %}",
  87. "pattern-repeat": "35",
  88. "pattern-polygon": "true",
  89. "pattern-pixelSize": "9",
  90. "pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}",
  91. "pattern-path-width": "0",
  92. "pattern-path-color": "{{ const[network].color }}",
  93. "pattern-path-fillOpacity": "1",
  94. "textFontWeight": "bold"
  95. },
  96. "style:hover": {
  97. "pane": "hover",
  98. "width": "4",
  99. "color": "black",
  100. "lineCap": "{% if hover == 'forward' or hover == 'backward' %}butt{% else %}round{% endif %}",
  101. "dashArray": "{% if hover == 'forward' or hover == 'backward' %}27,8{% endif %}",
  102. "dashOffset": "{% if hover == 'backward' %}28{% else %}0{% endif %}",
  103. "noClip": "{% if hover == 'forward' or hover == 'backward' %}true{% else %}false{% endif %}",
  104. "pattern": "{% if hover == 'forward' or hover == 'backward' %}arrowHead{% endif %}",
  105. "pattern-offset": "{% if hover == 'backward' %}4{% else %}30.5{% endif %}",
  106. "pattern-repeat": "35",
  107. "pattern-polygon": "true",
  108. "pattern-pixelSize": "9",
  109. "pattern-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}",
  110. "pattern-path-width": "0",
  111. "pattern-path-color": "black",
  112. "pattern-path-fillOpacity": "1"
  113. },
  114. "style:selected": {
  115. "pane": "selected",
  116. "width": "4",
  117. "color": "#3f3f3f",
  118. "lineCap": "{% if selected == 'forward' or selected == 'backward' %}butt{% else %}round{% endif %}",
  119. "dashArray": "{% if selected == 'forward' or selected == 'backward' %}27,8{% endif %}",
  120. "dashOffset": "{% if selected == 'backward' %}28{% else %}0{% endif %}",
  121. "noClip": "{% if selected == 'forward' or selected == 'backward' %}true{% else %}false{% endif %}",
  122. "pattern": "{% if selected == 'forward' or selected == 'backward' %}arrowHead{% endif %}",
  123. "pattern-offset": "{% if selected == 'backward' %}4{% else %}30.5{% endif %}",
  124. "pattern-repeat": "35",
  125. "pattern-polygon": "true",
  126. "pattern-pixelSize": "9",
  127. "pattern-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}",
  128. "pattern-path-width": "0",
  129. "pattern-path-color": "#3f3f3f",
  130. "pattern-path-fillOpacity": "1"
  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. }