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.

196 lines
7.8 KiB

6 years ago
6 years ago
6 years ago
7 years ago
  1. {
  2. "type": "overpass",
  3. "name": {
  4. "ast": "Hestoria",
  5. "cs": "Historické",
  6. "de": "Geschichte",
  7. "el": "Ιστορικά",
  8. "en": "Historic",
  9. "et": "Ajalooline",
  10. "fr": "Histoire",
  11. "hu": "Történelmi objektumok",
  12. "it": "Storia",
  13. "ja": "記念",
  14. "nl": "Historisch",
  15. "pl": "Miejsca Historyczne",
  16. "pt": "Histórico",
  17. "pt-br": "Histórico",
  18. "ro": "Istoric",
  19. "ru": "Историческое",
  20. "uk": "Історія"
  21. },
  22. "query": {
  23. "11": [
  24. "(",
  25. "node[historic~\"^(castle|archaeological_site|battlefield)$\"];",
  26. "way[historic~\"^(castle|archaeological_site|battlefield)$\"];",
  27. "relation[historic~\"^(castle|archaeological_site|battlefield)$\"];",
  28. ")"
  29. ],
  30. "14": [
  31. "(",
  32. "node[historic][historic!~\"^(memorial|monument|wayside_cross|wayside_shrine|wayside_chapel)$\"];",
  33. "way[historic][historic!~\"^(memorial|monument|wayside_cross|wayside_shrine|wayside_chapel)$\"];",
  34. "relation[historic][historic!~\"^(memorial|monument|wayside_cross|wayside_shrine|wayside_chapel)$\"];",
  35. "node[memorial~\"^(flood_mark|high_water_mark)$\"];",
  36. "node[\"memorial:type\"~\"^(flood_mark|high_water_mark)$\"];",
  37. "node[flood_mark];",
  38. ")"
  39. ]
  40. },
  41. "feature": {
  42. "description": [
  43. "{% set historic = tags.historic %}",
  44. "{% if attribute(tags, 'memorial') == 'high_water_mark' or attribute(tags, 'memorial:type') == 'high_water_mark' or attribute(tags, 'memorial') == 'flood_mark' or attribute(tags, 'memorial:type') == 'flood_mark' or tags.historic == 'highwater_mark' or (tags.historic != 'flood_mark' and tags.flood_mark) %}",
  45. "{{ tagTrans('historic', 'flood_mark') }}",
  46. "{{ debug(id ~ ': Deprecated tagging. Please use historic=flood_mark.') }}",
  47. "{% set historic = 'flood_mark' %}",
  48. "{% else %}",
  49. "{{ tagTransList('historic', tags.historic) }}",
  50. "{% endif %}",
  51. "",
  52. "{% if tags.flood_mark and tags.flood_mark != 'yes' %}({{ tagTrans('flood_mark', tags.flood_mark) }}){% endif %}"
  53. ],
  54. "body": [
  55. "<ul>",
  56. "{% if tags.inscription %}",
  57. " <li class='hasSymbol'>",
  58. " <i class=\"fa fa-pencil-alt\" aria-hidden=\"true\"></i>",
  59. " <span class='key'>{{ keyTrans('inscription') }}:</span>",
  60. " <span class='value'>{{ localizedTag(tags, 'inscription') }}</span>",
  61. " </li>",
  62. "{% elseif attribute(tags, 'inscription:url') %}",
  63. " <li class='hasSymbol'>",
  64. " <i class=\"fa fa-pencil-alt\" aria-hidden=\"true\"></i>",
  65. " <span class='key'><a href=\"{{ attribute(tags, 'inscription:url') }}\">{{ keyTrans('inscription') }}</a></span>",
  66. " </li>",
  67. "{% endif %}",
  68. "",
  69. "{% if attribute(tags, 'historic:civilization') %}",
  70. " <li class='hasSymbol'>",
  71. " <i class=\"fa fa-users\" aria-hidden=\"true\"></i>",
  72. " <span class='key'>{{ keyTrans('historic:civilization') }}:</span>",
  73. " <span class='value'>{{ tagTrans('historic:civilization', attribute(tags, 'historic:civilization')) }}</span>",
  74. " </li>",
  75. "{% endif %}",
  76. "",
  77. "{% if attribute(tags, 'memorial:conflict') %}",
  78. " <li class='hasSymbol'>",
  79. " <i class=\"fa fa-bolt\" aria-hidden=\"true\"></i>",
  80. " <span class='key'>{{ keyTrans('memorial:conflict') }}:</span>",
  81. " <span class='value'>{{ tagTransList('memorial:conflict', attribute(tags, 'memorial:conflict')) }}</span>",
  82. " </li>",
  83. "{% endif %}",
  84. "",
  85. "{% if tags.flood_date %}",
  86. " <li class='hasSymbol'>",
  87. " <i class=\"fas fa-calendar-alt\"></i>",
  88. " <span class='key'>{{ keyTrans('flood_date') }}:</span>",
  89. " <span class='value'>",
  90. " {% set flood_dates = [] %}",
  91. " {% for d in tags.flood_date|split(';') %}",
  92. " {% set flood_dates = flood_dates|merge([ d|trim|osmFormatDate ]) %}",
  93. " {% endfor %}",
  94. " {{ flood_dates|enumerate }}",
  95. " </span>",
  96. " </li>",
  97. "{% endif %}"
  98. ],
  99. "markerSign": "{{ const[historic].sign|raw }}"
  100. },
  101. "info": [
  102. "<table>",
  103. "{% for value, data in const %}",
  104. "{% if data.zoom <= map.zoom %}",
  105. " <tr>",
  106. " <td>{{ markerCircle({})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
  107. " <td>{{ tagTrans('historic', value) }}</td>",
  108. " </tr>",
  109. "{% endif %}",
  110. "{% endfor %}",
  111. "{% if 14 <= map.zoom %}",
  112. " <tr>",
  113. " <td>{{ markerCircle({})|raw }}<div class='sign'></div></td>",
  114. " <td>{{ trans('other') }}</td>",
  115. " </tr>",
  116. "{% endif %}",
  117. "</table>"
  118. ],
  119. "const": {
  120. "archaeological_site": {
  121. "sign": "<i class=\"fas fa-archway\"></i>",
  122. "zoom": 11
  123. },
  124. "battlefield": {
  125. "sign": "⚔️",
  126. "zoom": 11
  127. },
  128. "castle": {
  129. "sign": "<img data-src='maki:castle'>",
  130. "zoom": 11
  131. },
  132. "building": {
  133. "sign": "<img data-src='maki:building'>",
  134. "zoom": 14
  135. },
  136. "aircraft": {
  137. "sign": "<img data-src='maki:airport'>",
  138. "zoom": 14
  139. },
  140. "ruins": {
  141. "sign": "<img data-src='temaki:ruins'>",
  142. "zoom": 14
  143. },
  144. "flood_mark": {
  145. "sign": "<i class=\"fas fa-water\"></i>",
  146. "zoom": 14,
  147. "query": "(node[historic][memorial~\"^(flood_mark|high_water_mark)$\"];node[historic][\"memorial:type\"~\"^(flood_mark|high_water_mark)$\"];node[historic~\"^(highwater_mark|flood_mark)$\"];)"
  148. }
  149. },
  150. "filter": {
  151. "type": {
  152. "key": "historic",
  153. "show_default": "true",
  154. "name": "{{ trans('filter:type') }}",
  155. "type": "select",
  156. "values": "{% set list = [] %}{% for t, v in const %}<option value=\"{{ t }}\" {% if const[t].query %}query='{{ const[t].query }}'{% endif %}>{% set list = list|merge([ t ]) %}{{ tagTrans('historic', t) }}</option>{% endfor %}<option value='other' query='nwr[historic][historic!~\"^({{ list|join('|') }})$\"]'>{{ trans('other') }}</option>",
  157. "valueName": "{{ tagTrans('historic', value) }}"
  158. },
  159. "conflict": {
  160. "key": "memorial:conflict",
  161. "op": "has",
  162. "name": "{{ keyTrans('memorial:conflict') }}",
  163. "type": "select",
  164. "values": [
  165. "WW1",
  166. "WW2"
  167. ],
  168. "valueName": "{{ tagTrans('memorial:conflict', value) }}"
  169. },
  170. "civilization": {
  171. "key": "historic:civilization",
  172. "op": "has",
  173. "name": "{{ keyTrans('historic:civilization') }}",
  174. "type": "select",
  175. "values": [
  176. "ancient_egyptian",
  177. "ancient_greek",
  178. "ancient_roman",
  179. "byzantine",
  180. "celtic",
  181. "etruscan",
  182. "imperial_chinese",
  183. "korean",
  184. "medieval",
  185. "modern",
  186. "neolithic",
  187. "nuragic",
  188. "ottoman",
  189. "prehistoric",
  190. "roman",
  191. "western_roman"
  192. ],
  193. "valueName": "{{ tagTrans('historic:civilization', value) }}"
  194. }
  195. }
  196. }