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.

88 lines
2.7 KiB

  1. type: overpass
  2. query:
  3. 14: nwr[~"^fixme(:.*|)$"~".",i]
  4. feature:
  5. pre: |
  6. {% set fixme = tags.fixme %}
  7. {% set category = null %}
  8. {% if not fixme %}
  9. {% for k, v in tags %}
  10. {% set m = k|matches('^fixme(:(.*))?$', 'i') %}
  11. {% if m %}
  12. {% set fixme = v %}
  13. {% set category = m[2] %}
  14. {% endif %}
  15. {% endfor %}
  16. {% endif %}
  17. {% if not category %}
  18. {% for k, d in const if d.match %}
  19. {% if fixme|matches(d.match, 'i') %}
  20. {% set category = k %}
  21. {% endif %}
  22. {% endfor %}
  23. {% endif %}
  24. details: |
  25. {{ fixme }}
  26. description: |
  27. {% set found = false %}
  28. {% for k in ['amenity', 'shop', 'telecom', 'waterway', 'craft', 'highway', 'railway', 'aerialway', 'emergency', 'geological', 'man_made', 'natural', 'office', 'power', 'aeroway', 'tourism', 'leisure', 'military', 'landuse', 'barrier', 'route'] if not found %}
  29. {% if attribute(tags, k) and attribute(tags, k) != 'yes' %}
  30. {{ tagTransList(k, attribute(tags, k)) }}
  31. {% set found = true %}
  32. {% endif %}
  33. {% endfor %}
  34. {% if found %}{# nothing #}
  35. {% elseif tags.building and tags.building != 'yes' %}
  36. {{ tagTransList('building', tags.building) }}
  37. {% elseif tags.historic and tags.historic not in ['heritage', 'yes', 'building'] %}
  38. {{ tagTransList('historic', tags.historic) }}
  39. {% elseif tags.building == 'yes' or tags.historic == 'building' %}
  40. {{ keyTrans('building') }}
  41. {% elseif tags.boundary %}
  42. {{ tagTrans('boundary', tags.boundary) }}
  43. {% endif %}
  44. body: |
  45. {{ fixme == 'yes' ? keyTrans('fixme') : fixme }}
  46. markerSymbol: |
  47. {{ markerPointer({ fillColor: const[category].color|default('#f2756a') }) }}
  48. listMarkerSymbol: |
  49. {{ markerCircle({ fillColor: const[category].color|default('#f2756a') }) }}
  50. filter:
  51. category:
  52. name: Category
  53. show_default: true
  54. type: select
  55. values: |
  56. {% for k, d in const %}
  57. <option value='{{ k }}' query='{{ d.query|default('nwr[~"fixme(:.*|)"~"' ~ d.match ~ '"') }},i]'>{{ tagTrans('fixme', k) }}</option>
  58. {% endfor %}
  59. const:
  60. name:
  61. match: 'name'
  62. query: '(nwr[~"fixme:name"~".",i];nwr[~"fixme(:.*|)"~"name",i];)'
  63. color: '#00b6a9'
  64. incomplete:
  65. match: '(continue|incomplete|unfinished)'
  66. color: '#bb972f'
  67. position:
  68. match: '(position|location)'
  69. color: '#71ab43'
  70. addr:
  71. match: 'addr'
  72. query: '(nwr["fixme:addr"];nwr[fixme~"addr",i];)'
  73. color: '#0070b6'
  74. maxspeed:
  75. match: 'maxspeed'
  76. query: '(nwr["fixme:maxspeed"];nwr[fixme~"maxspeed",i];)'
  77. color: '#a36af2'
  78. resurvey:
  79. match: 're-?survey'
  80. color: '#00b647'
  81. verify:
  82. match: '(verify|recheck)'
  83. color: '#eeb600'
  84. import:
  85. match: 'import'
  86. color: '#a6b600'