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.

126 lines
3.3 KiB

  1. type: overpass
  2. name:
  3. ast: Divisiones Alministratives
  4. ca: Àrees Administratives
  5. cs: Administrativní oblasti
  6. de: Administrative Gebiete
  7. el: Διοικητικά Όρια
  8. en: Administrative Areas
  9. es: Áreas Administrativas
  10. et: Administratiivalad
  11. fr: Zones administratives
  12. gl: Divisións administrativas
  13. hu: Közigazgatási határok
  14. it: Suddivisioni amministrative
  15. ja: 行政界
  16. nb: Administrative områder
  17. nl: Administratieve gebieden
  18. oc: Divisions administrativas
  19. pl: Obszary administracyjne
  20. pt: Regiões administrativas
  21. pt-br: Divisão político-administrativa
  22. ro: Zona administrativă
  23. ru: Административные границы
  24. sr: Административне зоне
  25. tr: İdari Alanlar
  26. query:
  27. 3: |-
  28. relation[admin_level=2];
  29. 6: |-
  30. relation[admin_level~"^(2|3)$"];
  31. 9: |-
  32. relation[admin_level~"^(2|3|4|5)$"];
  33. 11: |-
  34. relation[admin_level~"^(2|3|4|5|6|7)$"];
  35. 13: |-
  36. relation[admin_level~"^(2|3|4|5|6|7|8|9)$"];
  37. 15: |-
  38. relation[admin_level~"^(2|3|4|5|6|7|8|9|10|11)$"];
  39. members: true
  40. feature:
  41. pre: |-
  42. {% set width = map.zoom < const[tags.admin_level].minZoom + 1.5 ? 1.5 : 3 %}
  43. {% set color = colorInterpolate(['red', 'blue'], (tags.admin_level - 2) / 10) %}
  44. priority: |-
  45. {{ tags.admin_level }}
  46. styles: |-
  47. {{ type == 'way' ? 'default' : '' }}
  48. style:
  49. fill: true
  50. fillOpacity: 0
  51. width: |-
  52. {{ width }}
  53. color: |-
  54. {{ color }}
  55. markerSymbol: ''
  56. listMarkerSymbol: |
  57. {{ markerLine({ width: width, color: color }) }}
  58. description: |-
  59. {{ tagTrans("admin_level", tags.admin_level) }}
  60. body: |-
  61. {{ keyTrans("admin_level") }}: {{ tags.admin_level }}
  62. memberFeature:
  63. pre: |-
  64. {% set min_admin_level = 20 %}
  65. {% for r in masters %}
  66. {% if r.tags.admin_level and r.tags.boundary == 'administrative' %}
  67. {% if r.tags.admin_level * 1 < min_admin_level %}
  68. {% set min_admin_level = r.tags.admin_level * 1 %}
  69. {% endif %}
  70. {% endif %}
  71. {% endfor %}
  72. {% set width = 0 %}
  73. {% set color = 'black' %}
  74. {% if min_admin_level < 20 %}
  75. {% set width = map.zoom < const[min_admin_level].minZoom + 1.5 ? 1.5 : 3 %}
  76. {% set color = colorInterpolate(['red', 'blue'], (min_admin_level - 2) / 10) %}
  77. {% endif %}
  78. exclude: |-
  79. {{ type != 'way' }}
  80. listExclude: true
  81. body: |
  82. {% for r in masters %}
  83. {% if r.tags.admin_level and r.tags.boundary == 'administrative' %}
  84. {{ r.tags.admin_level }} <a href="#administrative/{{ r.id }}">{{ localizedTag(r.tags, 'name') }} ({{ tagTrans("admin_level", r.tags.admin_level) }})</a><br>
  85. {% endif %}
  86. {% endfor %}
  87. style:
  88. width: |-
  89. {{ width }}
  90. color: |-
  91. {{ color }}
  92. info: |-
  93. <table>
  94. {% for admin_level, data in const %}
  95. {% if data.minZoom <= map.zoom %}
  96. {% set width = map.zoom < const[admin_level].minZoom + 1.5 ? 1.5 : 3 %}
  97. {% set color = colorInterpolate(['red', 'blue'], (admin_level - 2) / 10) %}
  98. <tr>
  99. <td>{{ markerLine({ 'width': width, color: color })|raw }}</td>
  100. <td>{{ tagTrans('admin_level', admin_level) }} ({{ admin_level }})</td>
  101. </tr>
  102. {% endif %}
  103. {% endfor %}
  104. </table>
  105. const:
  106. 2:
  107. minZoom: 3
  108. 3:
  109. minZoom: 6
  110. 4:
  111. minZoom: 9
  112. 5:
  113. minZoom: 9
  114. 6:
  115. minZoom: 11
  116. 7:
  117. minZoom: 11
  118. 8:
  119. minZoom: 13
  120. 9:
  121. minZoom: 13
  122. 10:
  123. minZoom: 15
  124. 11:
  125. minZoom: 15