Browse Source

Adding a few tweaks to ice_skating

* indicate informal access
* add detailed sub-icons to lables
* consider 'unknown' as a form of restricted access
master
scarapella 3 months ago
parent
commit
774500c7a6
  1. 93
      ice_skating.yaml

93
ice_skating.yaml

@ -23,7 +23,7 @@ type: overpass
query: query:
# Ice rinks are intentionally excluded here as they are covered already by leisure.json and/or sport.json # Ice rinks are intentionally excluded here as they are covered already by leisure.json and/or sport.json
# TODO: add ice skating relations when there is more than one in the world # TODO: add ice skating relations when there is more than one in the world
'10': |-
'9': |-
( (
way["piste:type"="ice_skate"]; way["piste:type"="ice_skate"];
way[waterway][ice_skates]; way[waterway][ice_skates];
@ -59,9 +59,13 @@ feature:
{% set constIndex = (key ~ "=" ~ value) %} {% set constIndex = (key ~ "=" ~ value) %}
{% set item = const[constIndex] %} {% set item = const[constIndex] %}
{% if tags.ice_skates and tags.ice_skates in ['no','private','discouraged'] %}
{% if tags.informal and tags.informal in ['yes','unknown'] %}
{% set informal_value = tags.informal %}
{% endif %}
{% if tags.ice_skates and tags.ice_skates in ['no','private','discouraged','unknown'] %}
{% set restricted_access_value = tags.ice_skates %} {% set restricted_access_value = tags.ice_skates %}
{% elseif tags.access and tags.access in ['no','private','discouraged'] %}
{% elseif tags.access and tags.access in ['no','private','discouraged','unknown'] %}
{% set restricted_access_value = tags.access %} {% set restricted_access_value = tags.access %}
{% elseif type == 'way' and tags.waterway and tags.waterway != 'access_point' and tags.ice_skates and tags.ice_skates == 'kluning' %} {% elseif type == 'way' and tags.waterway and tags.waterway != 'access_point' and tags.ice_skates and tags.ice_skates == 'kluning' %}
{% set restricted_access_value = tags.ice_skates %} {% set restricted_access_value = tags.ice_skates %}
@ -79,14 +83,17 @@ feature:
{%if attribute(tags, 'waterbody:name')%} {%if attribute(tags, 'waterbody:name')%}
{{ localizedTag(tags, 'waterbody:name') }} {{ localizedTag(tags, 'waterbody:name') }}
{% endif %} {% endif %}
description: |
description: |-
{% if item.detailSign %}
{{ item.detailSign | raw }}
{% endif %}
{{ tagTrans(key, value) }} {{ tagTrans(key, value) }}
body: |- body: |-
<ul> <ul>
{% if attribute(tags, 'waterbody:name') %} {% if attribute(tags, 'waterbody:name') %}
<li class='hasSymbol'> <li class='hasSymbol'>
<i class="fas fa-water"></i> <i class="fas fa-water"></i>
{{ tagTrans('natural', 'water') }}:
<span class='key'>{{ tagTrans('natural', 'water') }}:</span>
<span class='value'>{{ localizedTag(tags, 'waterbody:name') }}</span> <span class='value'>{{ localizedTag(tags, 'waterbody:name') }}</span>
</li> </li>
{% endif %} {% endif %}
@ -94,7 +101,7 @@ feature:
{% if attribute(tags, 'surface') %} {% if attribute(tags, 'surface') %}
<li class='hasSymbol'> <li class='hasSymbol'>
<i class='fa fa-window-minimize'></i> <i class='fa fa-window-minimize'></i>
{{ keyTrans('Surface') }}:
<span class='key'>{{ keyTrans('surface') }}:</span>
<span class='value'>{{ attribute(tags, 'surface') ? tagTrans('surface', attribute(tags, 'surface')) : '' }}</span> <span class='value'>{{ attribute(tags, 'surface') ? tagTrans('surface', attribute(tags, 'surface')) : '' }}</span>
</li> </li>
{% endif %} {% endif %}
@ -102,29 +109,29 @@ feature:
{% if attribute(tags, 'operator') %} {% if attribute(tags, 'operator') %}
<li class='hasSymbol'> <li class='hasSymbol'>
<i class='fa fa-drivers-license-o'></i> <i class='fa fa-drivers-license-o'></i>
{{ keyTrans('operator') }}:
<span class='key'>{{ keyTrans('operator') }}:</span>
<span class='value'>{{ tagTrans('operator', attribute(tags, 'operator')) }}</span> <span class='value'>{{ tagTrans('operator', attribute(tags, 'operator')) }}</span>
</li> </li>
{% endif %} {% endif %}
{% if attribute(tags, 'access') %}
{% if attribute(tags, 'informal') %}
<li class='hasSymbol'> <li class='hasSymbol'>
<i class='fa fa-unlock'></i> <i class='fa fa-unlock'></i>
{{ keyTrans('access') }}:
<span class='value'>{{ tagTrans('access', attribute(tags, 'access'))}}</span>
<span class='key'>{{ keyTrans('informal') }}:</span>
<span class='value'>{{ tagTrans('informal', attribute(tags, 'informal'))}}</span>
</li> </li>
{% endif %} {% endif %}
{% if attribute(tags, 'ice_skates') and tags.ice_skates != 'kluning'%} {% if attribute(tags, 'ice_skates') and tags.ice_skates != 'kluning'%}
<li class='hasSymbol'> <li class='hasSymbol'>
<i class='fa fa-unlock'></i> <i class='fa fa-unlock'></i>
{{ keyTrans('ice_skates') }}:
<span class='key'>{{ keyTrans('ice_skates') }}:</span>
<span class='value'>{{ tagTrans('access', attribute(tags, 'ice_skates')) }}</span> <span class='value'>{{ tagTrans('access', attribute(tags, 'ice_skates')) }}</span>
</li> </li>
{% elseif type == 'way' and tags.waterway and tags.waterway != 'access_point' and tags.ice_skates and tags.ice_skates == 'kluning' %} {% elseif type == 'way' and tags.waterway and tags.waterway != 'access_point' and tags.ice_skates and tags.ice_skates == 'kluning' %}
<li class='hasSymbol'> <li class='hasSymbol'>
<i class='fa fa-unlock'></i> <i class='fa fa-unlock'></i>
{{ keyTrans('ice_skates') }}:
<span class='key'>{{ keyTrans('ice_skates') }}:</span>
<span class='value'>{{ tagTrans('access', 'no') }}</span> <span class='value'>{{ tagTrans('access', 'no') }}</span>
</li> </li>
{% endif %} {% endif %}
@ -132,33 +139,61 @@ feature:
{% if attribute(tags, 'kluning') and tags.kluning %} {% if attribute(tags, 'kluning') and tags.kluning %}
<li class='hasSymbol'> <li class='hasSymbol'>
<i class='fa fa-unlock'></i> <i class='fa fa-unlock'></i>
{{ keyTrans('kluning') }}:
<span class='key'>{{ keyTrans('kluning') }}:</span>
<span class='value'>{{ tagTrans('access', attribute(tags, 'kluning')) }}</span> <span class='value'>{{ tagTrans('access', attribute(tags, 'kluning')) }}</span>
</li> </li>
{% elseif tags.highway and tags.ice_skates=='kluning' %} {% elseif tags.highway and tags.ice_skates=='kluning' %}
<li class='hasSymbol'> <li class='hasSymbol'>
<i class='fa fa-unlock'></i> <i class='fa fa-unlock'></i>
{{ keyTrans('kluning') }}:
<span class='key'>{{ keyTrans('kluning') }}:</span>
<span class='value'>{{ tagTrans('access', 'yes') }}</span> <span class='value'>{{ tagTrans('access', 'yes') }}</span>
</li> </li>
{% endif %} {% endif %}
{% if attribute(tags, 'access') %}
<li class='hasSymbol'>
<i class='fa fa-unlock'></i>
<span class='key'>{{ keyTrans('access') }}:</span>
<span class='value'>{{ tagTrans('access', attribute(tags, 'access'))}}</span>
</li>
{% endif %}
{% if attribute(tags, 'fee') %}
<li class='hasSymbol'>
<i class='fa fa-money'></i>
<span class='key'>{{ keyTrans('fee') }}:</span>
<span class='value'>{{ tagTrans('fee', attribute(tags, 'fee')) }}</span>
</li>
{% endif %}
{% if attribute(tags,'ice_skates:description') %}
<li class='hasSymbol'>
<i class="fas fa-skating"></i>
<span class='value'>{{ localizedTag(tags, 'ice_skates:description') }}</span>
</li>
{% endif %}
{% if attribute(tags,'wheelchair:description') %}
<li class='hasSymbol'>
<i class='fa fa-wheelchair'></i>
<span class='value'>{{ localizedTag(tags, 'wheelchair:description') }}</span>
</li>
{% endif %}
</ul> </ul>
markerSign: '{{ item[''sign''] | raw }}' markerSign: '{{ item[''sign''] | raw }}'
markerSymbol: |- markerSymbol: |-
{% if item.symbol=='pointer' %} {% if item.symbol=='pointer' %}
{% if restricted_access_value %} {% if restricted_access_value %}
{{ markerPointer({ fillColor: '#7F7F7F' }) }}
{{ markerPointer({ fillColor: item.style.color_restricted }) }}
{% else %} {% else %}
{{ markerPointer({ fillColor: '#AA99DD' }) }}
{{ markerPointer({ fillColor: item.style.color }) }}
{% endif %} {% endif %}
{% endif %} {% endif %}
listMarkerSymbol: |- listMarkerSymbol: |-
{% if item.symbol == 'pointer' %} {% if item.symbol == 'pointer' %}
{% if restricted_access_value %} {% if restricted_access_value %}
{{ markerCircle({ fillColor: '#7F7F7F' }) }}
{{ markerCircle({ fillColor: item.style.color_restricted }) }}
{% else %} {% else %}
{{ markerCircle({ fillColor: '#AA99DD' }) }}
{{ markerCircle({ fillColor: item.style.color }) }}
{% endif %} {% endif %}
{% elseif item.symbol == 'polygon' %} {% elseif item.symbol == 'polygon' %}
polygon polygon
@ -169,7 +204,9 @@ feature:
width: '{{ item.style.width }}' width: '{{ item.style.width }}'
color: |- color: |-
{% if restricted_access_value %} {% if restricted_access_value %}
#7F7F7F
{{ item.style.color_restricted }}
{% elseif informal_value %}
{{ item.style.color_informal }}
{% else %} {% else %}
{{ item.style.color }} {{ item.style.color }}
{% endif %} {% endif %}
@ -197,21 +234,35 @@ const:
style: style:
width: 4 width: 4
color: '#AA99DD' color: '#AA99DD'
color_informal: '#948CAE'
color_restricted: '#7F7F7F'
text: true text: true
priority: 0
priority: 1
ice_skates=kluning: #To align better with either typical access restrictions or pistes, this tag should be more like a piste:type=kluning or a highway with access ice_skates=kluning. However ice_skates=kluning is the *documented* tagging for now. ice_skates=kluning: #To align better with either typical access restrictions or pistes, this tag should be more like a piste:type=kluning or a highway with access ice_skates=kluning. However ice_skates=kluning is the *documented* tagging for now.
symbol: line symbol: line
style: style:
width: 4 width: 4
color: '#998888' color: '#998888'
color_informal: '#DD9999'
color_restricted: '#7F7F7F'
text: true text: true
priority: 0
priority: 1
waterway=access_point: waterway=access_point:
symbol: pointer symbol: pointer
sign: <i class="fas fa-skating"></i> sign: <i class="fas fa-skating"></i>
detailSign: <i class="fas fa-water"></i>
style:
color: '#AA99DD'
color_informal: '#948CAE'
color_restricted: '#7F7F7F'
priority: 0 priority: 0
leisure=slipway: leisure=slipway:
symbol: pointer symbol: pointer
sign: <i class="fas fa-skating"></i> sign: <i class="fas fa-skating"></i>
detailSign: <img src='maki:slipway'>
style:
color: '#AA99DD'
color_informal: '#948CAE'
color_restricted: '#7F7F7F'
priority: 0 priority: 0
Loading…
Cancel
Save