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.

92 lines
3.3 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. <option value='name' query='(nwr[~"fixme:name"~".",i];nwr[~"fixme(:.*|)"~"name",i];)'>{{ keyTrans('name') }}</option>
  57. <option value='position' query='nwr[fixme~"(position|location)",i]'>{{ tagTrans('fixme', 'position') }}</option>
  58. <option value='addr' query='(nwr["fixme:addr"];nwr[fixme~"addr",i];)'>{{ tagTrans('fixme', 'addr') }}</option>
  59. <option value='maxspeed' query='(nwr["fixme:maxspeed"];nwr[fixme~"maxspeed",i];)'>{{ tagTrans('fixme', 'maxspeed') }}</option>
  60. <option value='imcomplete' query='nwr[fixme~"(continue|incomplete|unfinished)",i]'>{{ tagTrans('fixme', 'continue') }}</option>
  61. <option value='resurvey' query='nwr[fixme~"resurvey",i]'>{{ tagTrans('fixme', 'resurvey') }}</option>
  62. <option value='verify' query='nwr[fixme~"(verify|recheck)",i]'>{{ tagTrans('fixme', 'verify') }}</option>
  63. <option value='import' query='nwr[fixme~"import",i]'>{{ tagTrans('fixme', 'import') }}</option>
  64. const:
  65. default:
  66. color: '#f2756a'
  67. name:
  68. match: 'name'
  69. color: '#00b6a9'
  70. incomplete:
  71. match: '(continue|incomplete|unfinished)'
  72. color: '#bb972f'
  73. position:
  74. match: '(position|location)'
  75. color: '#71ab43'
  76. addr:
  77. match: 'addr'
  78. color: '#0070b6'
  79. maxspeed:
  80. match: 'maxspeed'
  81. color: '#a36af2'
  82. resurvey:
  83. match: 're-?survey'
  84. color: '#00b647'
  85. verify:
  86. match: '(verify|recheck)'
  87. color: '#eeb600'
  88. import:
  89. match: 'import'
  90. color: '#a6b600'