Browse Source

Merge branch 'culture-more-info'

places
parent
commit
11e889ecf8
  1. 66
      culture.json
  2. 24
      detailsBody.html
  3. 47
      historic.json
  4. 42
      memorial.json
  5. 24
      popupBody.html
  6. 10
      tourism_attractions.json

66
culture.json

@ -30,6 +30,7 @@
"node[tourism~\"^(artwork|gallery|museum|theme_park)$\"];", "node[tourism~\"^(artwork|gallery|museum|theme_park)$\"];",
"way[tourism~\"^(artwork|gallery|museum|theme_park)$\"];", "way[tourism~\"^(artwork|gallery|museum|theme_park)$\"];",
"relation[tourism~\"^(artwork|gallery|museum|theme_park)$\"];", "relation[tourism~\"^(artwork|gallery|museum|theme_park)$\"];",
"nwr[shop~\"^(art)$\"];",
")" ")"
] ]
}, },
@ -41,28 +42,81 @@
"{% elseif tags.tourism %}", "{% elseif tags.tourism %}",
"{% set key = 'tourism' %}", "{% set key = 'tourism' %}",
"{% set value = tags.tourism %}", "{% set value = tags.tourism %}",
"{% elseif tags.shop %}",
"{% set key = 'shop' %}",
"{% set value = tags.shop %}",
"{% endif %}" "{% endif %}"
], ],
"description": "{{ tagTrans(key, value) }}",
"markerSign": "{{ attribute(const, key ~ '=' ~ value) }}"
"description": [
"{% if key == 'shop' %}",
" {{ keyTrans(key) }} ({{ tagTrans(key, value) }})",
"{% else %}",
" {{ tagTrans(key, value) }}",
"{% endif %}",
"",
"{% if tags.tourism == 'museum' and tags.museum %}",
"({{ tagTrans('museum', tags.museum) }})",
"{% endif %}",
"{% if tags.amenity == 'theatre' and attribute(tags, 'theatre:genre') %}",
"({{ tagTrans('theatre:genre', attribute(tags, 'theatre:genre')) }})",
"{% endif %}",
"{% if tags.amenity == 'community_centre' and tags.community_centre %}",
"({{ tagTrans('community_centre', tags.community_centre) }})",
"{% endif %}"
],
"body": [
"<ul>",
"{% if tags.inscription %}",
" <li class='hasSymbol'>",
" <i class=\"fa fa-pencil-alt\" aria-hidden=\"true\"></i>",
" <span class='key'>{{ keyTrans('inscription') }}:</span>",
" <span class='value'>{{ localizedTag(tags, 'inscription') }}</span>",
" </li>",
"{% elseif attribute(tags, 'inscription:url') %}",
" <li class='hasSymbol'>",
" <i class=\"fa fa-pencil-alt\" aria-hidden=\"true\"></i>",
" <span class='key'><a href=\"{{ attribute(tags, 'inscription:url') }}\">{{ keyTrans('inscription') }}</a></span>",
" </li>",
"{% endif %}",
"",
"{% if tags.artist_name %}",
" <li class='hasSymbol'>",
" <i class=\"fa fa-palette\" aria-hidden=\"true\"></i>",
" <span class='key'>{{ keyTrans('artist_name') }}:</span>",
" <span class='value'>{{ enumerate(tags.artist_name) }}</span>",
" </li>",
"{% endif %}",
"",
"{% if tags.material %}",
" <li class='hasSymbol'>",
" <img data-src=\"maki:warehouse\">",
" <span class='key'>{{ keyTrans('material') }}:</span>",
" <span class='value'>{{ tagTransList('material', tags.material) }}</span>",
" </li>",
"{% endif %}",
"",
"</ul>"
],
"markerSign": "{{ attribute(const, key ~ '=' ~ value)|raw }}"
}, },
"const": { "const": {
"amenity=arts_centre": "🎨", "amenity=arts_centre": "🎨",
"amenity=cinema": "🎦", "amenity=cinema": "🎦",
"amenity=community_centre": "",
"amenity=community_centre": "<i class=\"fas fa-users\" aria-hidden=\"true\"></i>",
"amenity=fountain": "⛲", "amenity=fountain": "⛲",
"amenity=studio": "",
"amenity=studio": "<i class=\"fas fa-microphone\"></i>",
"amenity=theatre": "🎭", "amenity=theatre": "🎭",
"tourism=artwork": "🎨 ", "tourism=artwork": "🎨 ",
"tourism=gallery": "🖼", "tourism=gallery": "🖼",
"tourism=museum": "🏛 ", "tourism=museum": "🏛 ",
"tourism=theme_park": ""
"tourism=theme_park": "<img data-src='maki:amusement-park'>",
"shop=art": "<i class=\"fa fa-shopping-cart\"></i>"
}, },
"info": [ "info": [
"<table>", "<table>",
"{% for value, sign in const %}", "{% for value, sign in const %}",
" <tr>", " <tr>",
" <td>{{ markerCircle({})|raw }}<div class='sign'>{{ sign }}</div></td>",
" <td>{{ markerCircle({})|raw }}<div class='sign'>{{ sign|raw }}</div></td>",
" <td>{{ tagTrans(value|split('=')[0], value|split('=')[1]) }}</td>", " <td>{{ tagTrans(value|split('=')[0], value|split('=')[1]) }}</td>",
" </tr>", " </tr>",
"{% endfor %}", "{% endfor %}",

24
detailsBody.html

@ -1,4 +1,12 @@
<ul> <ul>
{% set hasDescription = tagsPrefix(tags, 'description:') %}
{% if tags.description or hasDescription %}
<li class='hasSymbol'>
<i class="fa fa-info" aria-hidden="true"></i>
<span class='value'>{{ localizedTag(tags, 'description')|default(attribute(tags, 'description:' ~ hasDescription|keys[0])) }}</span>
</li>
{% endif %}
{% set address = tagsPrefix(tags, 'addr:') %} {% set address = tagsPrefix(tags, 'addr:') %}
{% if address %} {% if address %}
<li class='hasSymbol'> <li class='hasSymbol'>
@ -133,4 +141,20 @@
</li> </li>
{% endif %} {% endif %}
{% if tags.start_date %}
<li class='hasSymbol'>
<i class="fa fa-clock-o" aria-hidden="true"></i>
<span class='key'>{{ keyTrans('start_date') }}:</span>
<span class='value'>{{ enumerate(tags.start_date) }}</span>
</li>
{% endif %}
{% if tags.opening_date %}
<li class='hasSymbol'>
<i class="fa fa-clock-o" aria-hidden="true"></i>
<span class='key'>{{ keyTrans('opening_date') }}:</span>
<span class='value'>{{ enumerate(tags.opening_date) }}</span>
</li>
{% endif %}
</ul> </ul>

47
historic.json

@ -37,6 +37,37 @@
}, },
"feature": { "feature": {
"description": "{{ tagTransList('historic', tags.historic) }}", "description": "{{ tagTransList('historic', tags.historic) }}",
"body": [
"<ul>",
"{% if tags.inscription %}",
" <li class='hasSymbol'>",
" <i class=\"fa fa-pencil-alt\" aria-hidden=\"true\"></i>",
" <span class='key'>{{ keyTrans('inscription') }}:</span>",
" <span class='value'>{{ localizedTag(tags, 'inscription') }}</span>",
" </li>",
"{% elseif attribute(tags, 'inscription:url') %}",
" <li class='hasSymbol'>",
" <i class=\"fa fa-pencil-alt\" aria-hidden=\"true\"></i>",
" <span class='key'><a href=\"{{ attribute(tags, 'inscription:url') }}\">{{ keyTrans('inscription') }}</a></span>",
" </li>",
"{% endif %}",
"",
"{% if attribute(tags, 'historic:civilization') %}",
" <li class='hasSymbol'>",
" <i class=\"fa fa-users\" aria-hidden=\"true\"></i>",
" <span class='key'>{{ keyTrans('historic:civilization') }}:</span>",
" <span class='value'>{{ tagTrans('historic:civilization', attribute(tags, 'historic:civilization')) }}</span>",
" </li>",
"{% endif %}",
"",
"{% if attribute(tags, 'memorial:conflict') %}",
" <li class='hasSymbol'>",
" <i class=\"fa fa-bolt\" aria-hidden=\"true\"></i>",
" <span class='key'>{{ keyTrans('memorial:conflict') }}:</span>",
" <span class='value'>{{ tagTransList('memorial:conflict', attribute(tags, 'memorial:conflict')) }}</span>",
" </li>",
"{% endif %}"
],
"markerSign": "{{ const[tags.historic].sign|raw }}" "markerSign": "{{ const[tags.historic].sign|raw }}"
}, },
"info": [ "info": [
@ -59,19 +90,27 @@
], ],
"const": { "const": {
"archaeological_site": { "archaeological_site": {
"sign": "",
"sign": "<i class=\"fas fa-archway\"></i>",
"zoom": 11 "zoom": 11
}, },
"battlefield": { "battlefield": {
"sign": "",
"sign": "⚔️",
"zoom": 11 "zoom": 11
}, },
"castle": { "castle": {
"sign": "<img src='maki:castle'>",
"sign": "<img data-src='maki:castle'>",
"zoom": 11 "zoom": 11
}, },
"building": {
"sign": "<img data-src='maki:building'>",
"zoom": 14
},
"aircraft": { "aircraft": {
"sign": "<img src='maki:airport'>",
"sign": "<img data-src='maki:airport'>",
"zoom": 14
},
"ruins": {
"sign": "<img data-src='temaki:ruins'>",
"zoom": 14 "zoom": 14
} }
} }

42
memorial.json

@ -33,6 +33,46 @@
"{% endif %}" "{% endif %}"
], ],
"description": "{{ tagTransList('historic', value) }}", "description": "{{ tagTransList('historic', value) }}",
"body": [
"<ul>",
"{% if tags.inscription %}",
" <li class='hasSymbol'>",
" <i class=\"fa fa-pencil-alt\" aria-hidden=\"true\"></i>",
" <span class='key'>{{ keyTrans('inscription') }}:</span>",
" <span class='value'>{{ localizedTag(tags, 'inscription') }}</span>",
" </li>",
"{% elseif attribute(tags, 'inscription:url') %}",
" <li class='hasSymbol'>",
" <i class=\"fa fa-pencil-alt\" aria-hidden=\"true\"></i>",
" <span class='key'><a href=\"{{ attribute(tags, 'inscription:url') }}\">{{ keyTrans('inscription') }}</a></span>",
" </li>",
"{% endif %}",
"",
"{% if attribute(tags, 'historic:civilization') %}",
" <li class='hasSymbol'>",
" <i class=\"fa fa-users\" aria-hidden=\"true\"></i>",
" <span class='key'>{{ keyTrans('historic:civilization') }}:</span>",
" <span class='value'>{{ tagTrans('historic:civilization', attribute(tags, 'historic:civilization')) }}</span>",
" </li>",
"{% endif %}",
"",
"{% if attribute(tags, 'memorial:conflict') %}",
" <li class='hasSymbol'>",
" <i class=\"fa fa-bolt\" aria-hidden=\"true\"></i>",
" <span class='key'>{{ keyTrans('memorial:conflict') }}:</span>",
" <span class='value'>{{ tagTransList('memorial:conflict', attribute(tags, 'memorial:conflict')) }}</span>",
" </li>",
"{% endif %}",
"",
"{% if tags.artist_name %}",
" <li class='hasSymbol'>",
" <i class=\"fa fa-palette\" aria-hidden=\"true\"></i>",
" <span class='key'>{{ keyTrans('artist_name') }}:</span>",
" <span class='value'>{{ enumerate(tags.artist_name) }}</span>",
" </li>",
"{% endif %}",
"</ul>"
],
"markerSign": "{{ const[value].sign|raw }}" "markerSign": "{{ const[value].sign|raw }}"
}, },
"info": [ "info": [
@ -63,7 +103,7 @@
"zoom": 14 "zoom": 14
}, },
"monument": { "monument": {
"sign": "<img src='maki:monument?size=15'>",
"sign": "<img data-src='maki:monument?size=15'>",
"zoom": 11 "zoom": 11
} }
} }

24
popupBody.html

@ -1,4 +1,12 @@
<ul> <ul>
{% set hasDescription = tagsPrefix(tags, 'description:') %}
{% if tags.description or hasDescription %}
<li class='hasSymbol'>
<i class="fa fa-info" aria-hidden="true"></i>
<span class='value'>{{ localizedTag(tags, 'description')|default(attribute(tags, 'description:' ~ hasDescription|keys[0])) }}</span>
</li>
{% endif %}
{% set address = tagsPrefix(tags, 'addr:') %} {% set address = tagsPrefix(tags, 'addr:') %}
{% if address %} {% if address %}
<li class='hasSymbol'> <li class='hasSymbol'>
@ -139,4 +147,20 @@
<span class='value'><a href="https://{{ wikipedia[1] }}.wikipedia.org/wiki/{{ wikipedia[2]|replace({ ' ': '_' }) }}">{{ wikipedia[2] }}</a></span> <span class='value'><a href="https://{{ wikipedia[1] }}.wikipedia.org/wiki/{{ wikipedia[2]|replace({ ' ': '_' }) }}">{{ wikipedia[2] }}</a></span>
{% endif %} {% endif %}
{% if tags.start_date %}
<li class='hasSymbol'>
<i class="fa fa-clock-o" aria-hidden="true"></i>
<span class='key'>{{ keyTrans('start_date') }}:</span>
<span class='value'>{{ enumerate(tags.start_date) }}</span>
</li>
{% endif %}
{% if tags.opening_date %}
<li class='hasSymbol'>
<i class="fa fa-clock-o" aria-hidden="true"></i>
<span class='key'>{{ keyTrans('opening_date') }}:</span>
<span class='value'>{{ enumerate(tags.opening_date) }}</span>
</li>
{% endif %}
</ul> </ul>

10
tourism_attractions.json

@ -49,12 +49,12 @@
"const": { "const": {
"aquarium": "🐟", "aquarium": "🐟",
"artwork": "🎨 ", "artwork": "🎨 ",
"attraction": "<img src='maki:attraction'>",
"attraction": "<img data-src='maki:attraction'>",
"gallery": "🖼", "gallery": "🖼",
"museum": "<img src='maki:museum'>",
"picnic_site": "<img src='maki:picnic-site'>",
"theme_park": "<img src='maki:amusement-park'>",
"viewpoint": "<i class='fa fa-eye' aria-hidden='true'></i>",
"museum": "<img data-src='maki:museum'>",
"picnic_site": "<img data-src='maki:picnic-site'>",
"theme_park": "<img data-src='maki:amusement-park'>",
"viewpoint": "<i class='fas fa-eye' aria-hidden='true'></i>",
"zoo": "🦁" "zoo": "🦁"
} }
} }
Loading…
Cancel
Save