Main categories of OpenStreetBrowser with public transport zoom level
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.

270 lines
8.2 KiB

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