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.

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