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.

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