My main repository
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.

74 lines
2.4 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. {
  2. "type": "overpass",
  3. "name": {
  4. "en": "Recycling",
  5. "ru": "Переработка отходов"
  6. },
  7. "query": {
  8. "12": [
  9. "(",
  10. "node[amenity=recycling][recycling_type=centre][operator];",
  11. "way[amenity=recycling][recycling_type=centre][operator];",
  12. "relation[amenity=recycling][recycling_type=centre][operator];",
  13. ")"
  14. ],
  15. "14": [
  16. "(",
  17. "node[amenity=recycling][operator];",
  18. "way[amenity=recycling][operator];",
  19. "relation[amenity=recycling][operator];",
  20. ")"
  21. ]
  22. },
  23. "feature": {
  24. "pre": [
  25. "{% if tags.amenity == 'recycling' %}",
  26. " {% set key = 'amenity' %}",
  27. " {% set value = tags.amenity %}",
  28. " {% set recycling_color='gray' %}",
  29. " {% if attribute(tags, 'recycling:plastic_bottles') == 'yes' or attribute(tags, 'recycling:plastic') == 'yes' %}",
  30. " {% set recycling_color='green' %}",
  31. " {% endif %}",
  32. "{% endif %}",
  33. "{% set kv = key ~ '=' ~ value %}"
  34. ],
  35. "description": "{{ tagTrans(key, value) }}",
  36. "body": [
  37. "{% if tags.recycling_type %}",
  38. "{{ keyTrans('recycling_type') }}: {{ tagTrans('recycling_type', tags.recycling_type) }}",
  39. "{% endif %}"
  40. ],
  41. "markerSign": [
  42. "{% if const[kv] %}",
  43. "{{ const[kv].sign|raw }}",
  44. "{% endif %}"
  45. ],
  46. "markerSymbol": "{{ markerPointer({\"fillColor\": recycling_color })|raw }}",
  47. "listMarkerSymbol": "{{ markerCircle({\"fillColor\": recycling_color })|raw }}"
  48. },
  49. "info": [
  50. "<table>",
  51. "{% for kv, data in const %}",
  52. " {% if map.zoom >= data.minZoom %}",
  53. " {% set key = kv|split('=')[0] %}",
  54. " {% set value = kv|split('=')[1] %}",
  55. " <tr>",
  56. " <td>{{ markerCircle({})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
  57. " <td>{{ tagTrans('leisure', value) }}</td>",
  58. " </tr>",
  59. " {% endif %}",
  60. "{% endfor %}",
  61. " <tr>",
  62. " <td>{{ markerCircle({})|raw }}</td>",
  63. " <td>{{ trans('other') }}</td>",
  64. " </tr>",
  65. "</table>"
  66. ],
  67. "const": {
  68. "amenity=recycling": {
  69. "minZoom": 13,
  70. "sign": "<img src='maki:recycling'>"
  71. }
  72. }
  73. }