A repository for testing purposes.
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
1.9 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "en": "Edible Plants",
  5. "de": "Essbare Gewächse"
  6. },
  7. "query": {
  8. "14": [
  9. "(",
  10. "node[species~\"(Malus|Pyrus|Morus|Prunus persica|Prunus cerasus)\"];",
  11. "node[taxon~\"(Malus|Pyrus|Morus|Prunus persica|Prunus cerasus)\"];",
  12. ");"
  13. ]
  14. },
  15. "feature": {
  16. "pre": [
  17. "{% if tags.taxon %}",
  18. "{% set species = tags.taxon %}",
  19. "{% else %}",
  20. "{% set species = tags.species %}",
  21. "{% endif %}",
  22. "",
  23. "{% for d in const %}",
  24. "{% if species|matches(d.match) %}",
  25. "{% set data = d }}",
  26. "{% endif %}",
  27. "{% endfor %}"
  28. ],
  29. "description": [
  30. "{% if tags.taxon %}",
  31. "{{ localizedTag(tags, 'taxon') }}",
  32. "{% else %}",
  33. "{{ localizedTag(tags, 'species') }}",
  34. "{% endif %}"
  35. ],
  36. "markerSign": "{{ data.icon }}"
  37. },
  38. "info": [
  39. "<table>",
  40. "{% for data in const %}",
  41. " <tr>",
  42. " <td>{{ markerCircle({})|raw }}<div class='sign'>{{ data.icon }}</div></td>",
  43. " <td>{{ attribute(data, \"name:en\") }}</td>",
  44. " </tr>",
  45. "{% endfor %}",
  46. "</table>"
  47. ],
  48. "const": [
  49. {
  50. "match": "^Malus",
  51. "icon": "🍏",
  52. "name:en": "Apple"
  53. },
  54. {
  55. "match": "^Pyrus",
  56. "icon": "🍐",
  57. "name:en": "Pear"
  58. },
  59. {
  60. "match": "^Morus",
  61. "icon": "M",
  62. "name:en": "Mulberry"
  63. },
  64. {
  65. "match": "^Prunus persica",
  66. "icon": "🍑",
  67. "name:en": "Peach"
  68. },
  69. {
  70. "match": "^Prunus cerasus",
  71. "icon": "🍒",
  72. "name:en": "Cherry"
  73. }
  74. ]
  75. }