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.

29 lines
1.1 KiB

2 years ago
  1. type: overpass
  2. name:
  3. en: Example 5
  4. query:
  5. 15: nwr[amenity=restaurant]
  6. feature:
  7. description: |
  8. {{ tagTrans('amenity', tags.amenity) }}
  9. # Details are written to the right side of the popup / the box in the list.
  10. # tagTransList is a function, which splits the value by ';' and translates
  11. # each value individually. They are joined as enumeration.
  12. details: |
  13. {{ tagTransList('cuisine', tags.cuisine) }}
  14. filter:
  15. cuisine:
  16. name: "{{ keyTrans('cuisine') }}"
  17. type: select
  18. key: cuisine
  19. op: has # query semicolon-separated lists
  20. values: |
  21. {% for value in const.cuisine %}
  22. <option value='{{ value }}'>{{ tagTrans('cuisine', value) }}</option>
  23. {% endfor %}
  24. <option value='-' query='nwr[!cuisine]' weight='1'>{{ trans('empty value') }}</option>
  25. <option value='*' query='nwr[cuisine]' weight='1'>Any value</option>
  26. # The option will be ordered by text content. Set 'weight' option to override order.
  27. # Also, the last two options set an explicit OverpassQL query.
  28. const:
  29. cuisine: ["pizza", "burger", "kebab"]