Main categories of OpenStreetBrowser with support for whitewater
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.

254 lines
7.6 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "de": "Wildwasser strecke",
  5. "en": "Whitewater routes"
  6. },
  7. "query": {
  8. "10": [
  9. "(",
  10. "way[waterway~\"^(river)$\"];"
  11. ")"
  12. ]
  13. },
  14. "feature": {
  15. "pre": [
  16. "{% if tags.waterway %}",
  17. " {% set key = 'waterway' %}",
  18. " {% set value = tags.waterway %}",
  19. "{% elseif tags.water %}",
  20. " {% set key = 'water' %}",
  21. " {% set value = tags.water %}",
  22. "{% elseif tags.natural %}",
  23. " {% set key = 'natural' %}",
  24. " {% set value = tags.natural %}",
  25. "{% endif %}",
  26. "{% set kv = key ~ '=' ~ value %}",
  27. "{% set data = const[kv]|default(const['natural=water']) %}"
  28. ],
  29. "description": [
  30. "{{ tagTrans(key, value) }}"
  31. ],
  32. "body": [
  33. "<ul>",
  34. "{% if tags.intermittent %}",
  35. " <li class='hasSymbol'>",
  36. " <i class=\"far fa-circle\"></i>",
  37. " <span class='key'>{{ keyTrans('intermittent') }}:</span>",
  38. " <span class='value'>{{ tagTrans('intermittent', tags.intermittent) }}</span>",
  39. "{% endif %}",
  40. "</ul>"
  41. ],
  42. "markerSign": [
  43. "{{ const[kv].sign|raw }}"
  44. ],
  45. "markerSymbol": [
  46. "{% if data.symbol == 'pointer' %}",
  47. "{{ markerPointer({ fillColor: '#3388ff' })|raw }}",
  48. "{% endif %}"
  49. ],
  50. "listMarkerSymbol": [
  51. "{% if data.symbol == 'pointer' %}",
  52. "{{ markerCircle({ fillColor: '#3388ff' })|raw }}",
  53. "{% elseif data.symbol == 'polygon' %}",
  54. "polygon",
  55. "{% else %}",
  56. "line",
  57. "{% endif %}"
  58. ],
  59. "priority": "{{ data.priority }}",
  60. "style": {
  61. "width": "{{ data.style.width }}",
  62. "color": "{{ data.style.color }}",
  63. "text": [
  64. "{% if data.text %}",
  65. "{{ tags.name }} ➔ ",
  66. "{% endif %}"
  67. ],
  68. "textRepeat": "1",
  69. "dashArray": "{% if tags.intermittent == 'yes' %}5,5{% endif %}",
  70. "lineCap": "{% if tags.intermittent == 'yes' %}butt{% else %}round{% endif %}"
  71. }
  72. },
  73. "const": {
  74. "natural=water": {
  75. "zoom": 10,
  76. "symbol": "polygon",
  77. "style": {
  78. "width": 3,
  79. "color": "#3388ff"
  80. },
  81. "priority": 2
  82. },
  83. "water=lake": {
  84. "zoom": 10,
  85. "symbol": "polygon",
  86. "style": {
  87. "width": 3,
  88. "color": "#3388ff"
  89. },
  90. "hideInfo": true,
  91. "priority": 0
  92. },
  93. "water=lagoon": {
  94. "zoom": 10,
  95. "symbol": "polygon",
  96. "style": {
  97. "width": 3,
  98. "color": "#3388ff"
  99. },
  100. "hideInfo": true,
  101. "priority": 0
  102. },
  103. "water=reservoir": {
  104. "zoom": 10,
  105. "symbol": "polygon",
  106. "style": {
  107. "width": 3,
  108. "color": "#3388ff"
  109. },
  110. "hideInfo": true,
  111. "priority": 0
  112. },
  113. "waterway=river": {
  114. "zoom": 10,
  115. "symbol": "line",
  116. "style": {
  117. "width": 4,
  118. "color": "#3388ff"
  119. },
  120. "text": true,
  121. "priority": 1
  122. },
  123. "waterway=canal": {
  124. "alias": [
  125. "water=canal"
  126. ],
  127. "zoom": 10,
  128. "symbol": "line",
  129. "style": {
  130. "width": 4,
  131. "color": "#3388ff"
  132. },
  133. "text": true,
  134. "priority": 1
  135. },
  136. "waterway=stream": {
  137. "zoom": 13,
  138. "symbol": "line",
  139. "style": {
  140. "width": 2,
  141. "color": "#3388ff"
  142. },
  143. "text": true,
  144. "priority": 3
  145. },
  146. "waterway=drain": {
  147. "zoom": 13,
  148. "symbol": "line",
  149. "style": {
  150. "width": 2,
  151. "color": "#3388ff"
  152. },
  153. "text": true,
  154. "priority": 3
  155. },
  156. "waterway=ditch": {
  157. "zoom": 13,
  158. "symbol": "line",
  159. "style": {
  160. "width": 1,
  161. "color": "#3388ff"
  162. },
  163. "text": true,
  164. "priority": 5
  165. },
  166. "natural=spring": {
  167. "sign": "<i class='fas fa-water'></i>",
  168. "zoom": 13,
  169. "symbol": "pointer"
  170. },
  171. "natural=hot_spring": {
  172. "sign": "<i style='color: orange;' class='fas fa-water'></i>",
  173. "zoom": 13,
  174. "symbol": "pointer"
  175. },
  176. "natural=geyser": {
  177. "sign": "<i style='color: red;' class='fas fa-water'></i>",
  178. "zoom": 13,
  179. "symbol": "pointer"
  180. },
  181. "waterway=waterfall": {
  182. "sign": "<img data-src='maki:waterfall'>",
  183. "zoom": 13,
  184. "symbol": "pointer"
  185. },
  186. "waterway=dam": {
  187. "zoom": 13,
  188. "symbol": "line",
  189. "style": {
  190. "width": 3,
  191. "color": "#000000"
  192. },
  193. "priority": 3
  194. },
  195. "waterway=weir": {
  196. "zoom": 13,
  197. "symbol": "line",
  198. "style": {
  199. "width": 3,
  200. "color": "#000000"
  201. },
  202. "priority": 3
  203. },
  204. "natural=divide": {
  205. "zoom": 10,
  206. "symbol": "line",
  207. "style": {
  208. "width": 3,
  209. "color": "#ff0000"
  210. },
  211. "text": true,
  212. "priority": 0
  213. }
  214. },
  215. "filter": {
  216. "type": {
  217. "name": "{{ trans('filter:type') }}",
  218. "key": "natural",
  219. "type": "select",
  220. "show_default": "true",
  221. "values": "{% for k, data in const %}<option value=\"{{ k }}\" query=\"(nwr[{{ k }}];{% for a in data.alias %}nwr[{{ a }}];{% endfor %})\">{{ tagTrans(k) }}</option>{% endfor %}",
  222. "sort": "natsort"
  223. },
  224. "intermittent": {
  225. "name": "{{ keyTrans('intermittent') }}",
  226. "key": "intermittent",
  227. "type": "radio",
  228. "values": "<option value='yes' query=\"nwr[intermittent][intermittent!=no]\">{{ tagTrans('intermittent', 'yes') }}</option><option value='no' query=\"(nwr[!intermittent];nwr[intermittent=no];)\">{{ tagTrans('intermittent', 'no') }}</option>"
  229. }
  230. },
  231. "info": [
  232. "<table>",
  233. " {% for k, data in const %}",
  234. " {% if not data.hideInfo and data.zoom <= map.zoom %}",
  235. " <tr>",
  236. " <td>",
  237. " {% if data.symbol == 'pointer' %}",
  238. " {{ markerCircle({ fillColor: '#3388ff' })|raw }}<div class='sign'>{{ data.sign|raw }}</div>",
  239. " {% elseif data.symbol == 'polygon' %}",
  240. " {{ markerPolygon(data.style)|raw }}",
  241. " {% elseif data.symbol == 'line' %}",
  242. " {{ markerLine(data.style)|raw }}",
  243. " {% endif %}",
  244. " </td>",
  245. " <td>{{ tagTrans(k) }}</td>",
  246. " </tr>",
  247. " {% endif %}",
  248. " {% endfor %}",
  249. " <tr>",
  250. " <td>{{ markerLine({ width: 3, color: '#3388ff', dashArray: '5,5', lineCap: 'butt' })|raw }}</td>",
  251. " <td>{{ keyTrans('intermittent') }}</td>",
  252. " </tr>",
  253. "</table>"
  254. ]
  255. }