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.

283 lines
8.6 KiB

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