Some examples how to develop own categories.
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.

35 lines
907 B

2 years ago
  1. type: overpass
  2. name:
  3. en: Example 4
  4. de: Beispiel 4
  5. query:
  6. 15: nwr[amenity=fountain]
  7. 17: nwr[amenity~"^(fountain|drinking_water)$"]
  8. feature:
  9. description: |
  10. {{ tagTrans('amenity', tags.amenity) }}
  11. # Here, the correct icon for display is read from the 'const' structure
  12. markerSign: |
  13. {{ const[tags.amenity].icon }}
  14. markerSymbol: |
  15. {{ markerPointer({ fillColor: const[tags.amenity].color }) }}
  16. listMarkerSymbol: |
  17. {{ markerCircle({ fillColor: const[tags.amenity].color }) }}
  18. info: |
  19. <table>
  20. {% for value, data in const if data.zoom <= map.zoom %}
  21. <tr>
  22. <td>{{ markerCircle({ fillColor: data.color }) }}<div class='sign'>{{ data.icon }}</div></td>
  23. <td>{{ tagTrans('amenity', value) }}</td>
  24. </tr>
  25. {% endfor %}
  26. </table>
  27. const:
  28. fountain:
  29. icon:
  30. color: '#0000ff'
  31. zoom: 15
  32. drinking_water:
  33. icon: 🚰
  34. color: '#007fff'
  35. zoom: 17