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

{
"type": "overpass",
"name": {
"en": "Recycling",
"ru": "Переработка отходов"
},
"query": {
"12": [
"(",
"node[amenity=recycling][recycling_type=centre][operator];",
"way[amenity=recycling][recycling_type=centre][operator];",
"relation[amenity=recycling][recycling_type=centre][operator];",
")"
],
"14": [
"(",
"node[amenity=recycling][operator];",
"way[amenity=recycling][operator];",
"relation[amenity=recycling][operator];",
")"
]
},
"feature": {
"pre": [
"{% if tags.amenity == 'recycling' %}",
" {% set key = 'amenity' %}",
" {% set value = tags.amenity %}",
" {% set recycling_color='gray' %}",
" {% if attribute(tags, 'recycling:plastic_bottles') == 'yes' or attribute(tags, 'recycling:plastic') == 'yes' %}",
" {% set recycling_color='green' %}",
" {% endif %}",
"{% endif %}",
"{% set kv = key ~ '=' ~ value %}"
],
"description": "{{ tagTrans(key, value) }}",
"body": [
"{% if tags.recycling_type %}",
"{{ keyTrans('recycling_type') }}: {{ tagTrans('recycling_type', tags.recycling_type) }}",
"{% endif %}"
],
"markerSign": [
"{% if const[kv] %}",
"{{ const[kv].sign|raw }}",
"{% endif %}"
],
"markerSymbol": "{{ markerPointer({\"fillColor\": recycling_color })|raw }}",
"listMarkerSymbol": "{{ markerCircle({\"fillColor\": recycling_color })|raw }}"
},
"info": [
"<table>",
"{% for kv, data in const %}",
" {% if map.zoom >= data.minZoom %}",
" {% set key = kv|split('=')[0] %}",
" {% set value = kv|split('=')[1] %}",
" <tr>",
" <td>{{ markerCircle({})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
" <td>{{ tagTrans('leisure', value) }}</td>",
" </tr>",
" {% endif %}",
"{% endfor %}",
" <tr>",
" <td>{{ markerCircle({})|raw }}</td>",
" <td>{{ trans('other') }}</td>",
" </tr>",
"</table>"
],
"const": {
"amenity=recycling": {
"minZoom": 13,
"sign": "<img src='maki:recycling'>"
}
}
}