Main categories of OpenStreetBrowser
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.

117 lines
3.4 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. {
  2. "type": "overpass",
  3. "name": {
  4. "de": "Einrichtungen für Kinder",
  5. "en": "Children amenities",
  6. "fr": "Équipements pour enfants",
  7. "pt-br": "Equipamentos Infantis"
  8. },
  9. "query": {
  10. "15": [
  11. "(",
  12. "node[leisure~'^(playground|summer_camp|indoor_play)$'];",
  13. "way[leisure~'^(playground|summer_camp|indoor_play)$'];",
  14. "relation[leisure~'^(playground|summer_camp|indoor_play)$'];",
  15. "node[shop~'^(baby_goods|toys)$'];",
  16. "way[shop~'^(baby_goods|toys)$'];",
  17. "relation[shop~'^(baby_goods|toys)$'];",
  18. "node[amenity=toilets][diaper];",
  19. "way[amenity=toilets][diaper];relation[amenity=toilets][diaper];",
  20. "node[kids_area];",
  21. "way[kids_area];",
  22. "relation[kids_area];",
  23. ");"
  24. ],
  25. "17": [
  26. "(",
  27. "node[leisure~'^(playground|summer_camp|indoor_play)$'];",
  28. "way[leisure~'^(playground|summer_camp|indoor_play)$'];",
  29. "relation[leisure~'^(playground|summer_camp|indoor_play)$'];",
  30. "node[shop~'^(baby_goods|toys)$'];",
  31. "way[shop~'^(baby_goods|toys)$'];",
  32. "relation[shop~'^(baby_goods|toys)$'];",
  33. "node[amenity=toilets][diaper];",
  34. "way[amenity=toilets][diaper];relation[amenity=toilets][diaper];",
  35. "node[kids_area];",
  36. "way[kids_area];",
  37. "relation[kids_area];",
  38. "node[playground];",
  39. "way[playground];",
  40. "relation[playground];",
  41. ");"
  42. ]
  43. },
  44. "feature": {
  45. "pre": [
  46. "{% if tags.leisure %}",
  47. " {% set key = 'leisure' %}",
  48. " {% set value = tags.leisure %}",
  49. "{% elseif tags.kids_area %}",
  50. " {% set key = 'kids_area' %}",
  51. " {% set value = tags.kids_area %}",
  52. "{% elseif tags.shop %}",
  53. " {% set key = 'shop' %}",
  54. " {% set value = tags.shop %}",
  55. "{% elseif tags.playground %}",
  56. " {% set key = 'playground' %}",
  57. " {% set value = tags.playground %}",
  58. "{% else %}",
  59. " {% set key = 'amenity' %}",
  60. " {% set value = tags.amenity %}",
  61. "{% endif %}",
  62. "",
  63. "{% set type_data = const[key ~ '=' ~ value] |default(const['default=yes']) %}"
  64. ],
  65. "title": "{{ keyTrans(key) }}: {{localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) | default(tagTrans(key, value)) }}",
  66. "description": "{{ type_data }}",
  67. "markerSign": "{{ type_data.sign|raw }}",
  68. "priority": "{{ type_data.priority }}",
  69. "style": {
  70. "fillColor": "{% if tags.playground!='' %}#3388ff{% else %}#1dc140{% endif %}"
  71. }
  72. },
  73. "info": [
  74. "<table>",
  75. "{% for value, data in const %}",
  76. " <tr>",
  77. " <td>{{ markerCircle({})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
  78. " <td>{{ tagTrans(value|split('=')[0], value|split('=')[1]) }}</td>",
  79. " </tr>",
  80. "{% endfor %}",
  81. "</table>"
  82. ],
  83. "const": {
  84. "leisure=playground": {
  85. "priority": 10,
  86. "sign": "⛹"
  87. },
  88. "leisure=summer_camp": {
  89. "priority": 10,
  90. "sign": "🏕"
  91. },
  92. "leisure=indoor_play": {
  93. "priority": 8,
  94. "sign": "🏠"
  95. },
  96. "shop=baby_goods": {
  97. "priority": 8,
  98. "sign": "<i class=\"fa fa-shopping-cart\"></i>"
  99. },
  100. "shop=toys": {
  101. "priority": 8,
  102. "sign": "<i class=\"fa fa-shopping-cart\"></i>"
  103. },
  104. "amenity=toilets": {
  105. "priority": 6,
  106. "sign": "🚽🚼"
  107. },
  108. "playground=swing": {
  109. "priority": 4,
  110. "sign": ""
  111. },
  112. "default=yes": {
  113. "priority": 0,
  114. "sign": "X"
  115. }
  116. }
  117. }