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.

204 lines
8.9 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "ca": "Rutes Ciclistes",
  5. "cs": "Cyklotrasy",
  6. "de": "Radrouten",
  7. "en": "Cycle Routes",
  8. "es": "Rutas ciclistas",
  9. "fr": "Itinéraires vélo",
  10. "gl": "Rotas ciclistas",
  11. "hu": "Kerékpáros útvonalak",
  12. "it": "Percorsi ciclabili",
  13. "ja": "自転車ルート",
  14. "nb": "Sykkelruter",
  15. "nl": "Fietsroutes",
  16. "oc": "Itineraris ciclistas",
  17. "pl": "Trasy rowerowe",
  18. "pt": "Ciclovias",
  19. "pt-br": "Ciclorrotas",
  20. "ro": "Trasee ciclism",
  21. "ru": "Веломаршруты",
  22. "sr": "Трасе за бицикле",
  23. "tr": "Bisiklet Rotaları"
  24. },
  25. "query": {
  26. "6": "relation[type=route][route~\"^(|.*;)bicycle(|;.*)$\"][network~'^(|.*;)(icn)(|;.*)$']",
  27. "9": "relation[type=route][route~\"^(|.*;)bicycle(|;.*)$\"][network~'^(|.*;)(icn|ncn)(|;.*)$']",
  28. "12": "relation[type=route][route~\"^(|.*;)bicycle(|;.*)$\"][network~'^(|.*;)(icn|ncn|rcn)(|;.*)$']",
  29. "15": "relation[type=route][route~\"^(|.*;)bicycle(|;.*)$\"]"
  30. },
  31. "members": true,
  32. "feature": {
  33. "pre": [
  34. "{% set network = tags.network %}",
  35. "{% for n in tags.network|split(';') %}",
  36. "{% if n|matches('cn$') %}{% set network = n %}{% endif %}",
  37. "{% endfor %}"
  38. ],
  39. "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}",
  40. "description": "{{ tagTrans('network', network) }}",
  41. "markerSymbol": "",
  42. "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[network].color|default(const[''].color) })|raw }}",
  43. "priority": "{{ const[network].priority|default(4) }}",
  44. "styles": "",
  45. "style:hover": {
  46. "width": "0"
  47. },
  48. "style:selected": {
  49. "width": "0"
  50. }
  51. },
  52. "memberFeature": {
  53. "pre": [
  54. "{% set priority = 4 %}",
  55. "{% set network = '' %}",
  56. "{% set refs = [] %}",
  57. "{% set dirForward = false %}",
  58. "{% set dirBackward = false %}",
  59. "{% set hover = false %}",
  60. "{% set selected = false %}",
  61. "",
  62. "{% for master in masters %}",
  63. " {% set masterNetwork = '' %}",
  64. " {% for n in master.tags.network|split(';') %}",
  65. " {% if n|matches('cn$') %}{% set masterNetwork = n %}{% endif %}",
  66. " {% endfor %}",
  67. " {% set _p = const[masterNetwork].priority|default(4) %}",
  68. " {% if _p < priority %}",
  69. " {% set priority = _p %}",
  70. " {% set network = masterNetwork %}",
  71. " {% endif %}",
  72. " {% if master.tags.ref %}",
  73. " {% set refs = refs|merge([ master.tags.ref ]) %}",
  74. " {% endif %}",
  75. " {% if master.role == 'forward' %}{% set dirForward = true %}",
  76. " {% elseif master.role == 'backward' %}{% set dirBackward = true %}",
  77. " {% else %}{% set dirForward = true %}{% set dirBackward = true %}",
  78. " {% endif %}",
  79. " {% if master.flags.hover %}{% set hover = master.role|default('both') %}{% endif %}",
  80. " {% if master.flags.selected %}{% set selected = master.role|default('both') %}{% endif %}",
  81. "{% endfor %}"
  82. ],
  83. "title": "",
  84. "body": [
  85. "<h4>Routes</h4>",
  86. "<ul class='overpass-layer-list'>",
  87. "{% for master in masters %}",
  88. " {% set masterNetwork = '' %}",
  89. " {% for n in master.tags.network|split(';') %}",
  90. " {% if n|matches('cn$') %}{% set masterNetwork = n %}{% endif %}",
  91. " {% endfor %}",
  92. " <li data-object=\"{{ master.id }}\"><a>",
  93. " <div class='marker'>",
  94. " <div class='symbol'>{{ markerLine({ width: 4, color: const[masterNetwork].color|default(const[''].color) })|raw }}</div>",
  95. " </div>",
  96. " <div class='content'>",
  97. " <div class='description'>{{ tagTrans('network', masterNetwork) }}</div>",
  98. " <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 }}{% else %}{{ trans('unnamed') }}{% endif %}</div>",
  99. " </div>",
  100. " </a></li>",
  101. "{% endfor %}",
  102. "</ul>"
  103. ],
  104. "listExclude": "1",
  105. "styles": "default{% if hover %},hover{% endif %}{% if selected %},selected{% endif %}",
  106. "style": {
  107. "width": "4",
  108. "color": "{{ const[network].color }}",
  109. "opacity": "1",
  110. "lineCap": "{% if not dirForward or not dirBackward %}butt{% else %}round{% endif %}",
  111. "dashArray": "{% if not dirForward or not dirBackward %}27,8{% endif %}",
  112. "dashOffset": "{% if dirBackward %}28{% else %}0{% endif %}",
  113. "noClip": "{% if not dirForward or not dirBackward %}true{% else %}false{% endif %}",
  114. "text": "{{ refs|join(' · ') }} ",
  115. "textRepeat": "1",
  116. "textOffset": "12",
  117. "pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}",
  118. "pattern-offset": "{% if dirBackward %}4{% else %}30.5{% endif %}",
  119. "pattern-repeat": "35",
  120. "pattern-polygon": "true",
  121. "pattern-pixelSize": "9",
  122. "pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}",
  123. "pattern-path-width": "0",
  124. "pattern-path-color": "{{ const[network].color }}",
  125. "pattern-path-fillOpacity": "1",
  126. "textFontWeight": "bold"
  127. },
  128. "style:hover": {
  129. "pane": "hover",
  130. "width": "4",
  131. "color": "black",
  132. "lineCap": "{% if hover == 'forward' or hover == 'backward' %}butt{% else %}round{% endif %}",
  133. "dashArray": "{% if hover == 'forward' or hover == 'backward' %}27,8{% endif %}",
  134. "dashOffset": "{% if hover == 'backward' %}28{% else %}0{% endif %}",
  135. "noClip": "{% if hover == 'forward' or hover == 'backward' %}true{% else %}false{% endif %}",
  136. "pattern": "{% if hover == 'forward' or hover == 'backward' %}arrowHead{% endif %}",
  137. "pattern-offset": "{% if hover == 'backward' %}4{% else %}30.5{% endif %}",
  138. "pattern-repeat": "35",
  139. "pattern-polygon": "true",
  140. "pattern-pixelSize": "9",
  141. "pattern-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}",
  142. "pattern-path-width": "0",
  143. "pattern-path-color": "black",
  144. "pattern-path-fillOpacity": "1"
  145. },
  146. "style:selected": {
  147. "pane": "selected",
  148. "width": "4",
  149. "color": "#3f3f3f",
  150. "lineCap": "{% if selected == 'forward' or selected == 'backward' %}butt{% else %}round{% endif %}",
  151. "dashArray": "{% if selected == 'forward' or selected == 'backward' %}27,8{% endif %}",
  152. "dashOffset": "{% if selected == 'backward' %}28{% else %}0{% endif %}",
  153. "noClip": "{% if selected == 'forward' or selected == 'backward' %}true{% else %}false{% endif %}",
  154. "pattern": "{% if selected == 'forward' or selected == 'backward' %}arrowHead{% endif %}",
  155. "pattern-offset": "{% if selected == 'backward' %}4{% else %}30.5{% endif %}",
  156. "pattern-repeat": "35",
  157. "pattern-polygon": "true",
  158. "pattern-pixelSize": "9",
  159. "pattern-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}",
  160. "pattern-path-width": "0",
  161. "pattern-path-color": "#3f3f3f",
  162. "pattern-path-fillOpacity": "1"
  163. }
  164. },
  165. "const": {
  166. "icn": {
  167. "color": "#ff0000",
  168. "priority": 0,
  169. "zoom": 6
  170. },
  171. "ncn": {
  172. "color": "#ff00ba",
  173. "priority": 1,
  174. "zoom": 9
  175. },
  176. "rcn": {
  177. "color": "#ba00ff",
  178. "priority": 2,
  179. "zoom": 12
  180. },
  181. "lcn": {
  182. "color": "#0000ff",
  183. "priority": 3,
  184. "zoom": 15
  185. },
  186. "": {
  187. "color": "#007fff",
  188. "priority": 4,
  189. "zoom": 15
  190. }
  191. },
  192. "info": [
  193. "<table>",
  194. "{% for value, data in const %}",
  195. "{% if data.zoom <= map.zoom %}",
  196. " <tr>",
  197. " <td>{{ markerLine({ 'width': 4, color: data.color })|raw }}</td>",
  198. " <td>{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %}</td>",
  199. " </tr>",
  200. "{% endif %}",
  201. "{% endfor %}",
  202. "</table>"
  203. ]
  204. }