diff --git a/buildings-height.json b/buildings-height.json index dc08cf32..a29e75e6 100644 --- a/buildings-height.json +++ b/buildings-height.json @@ -34,6 +34,21 @@ "{% endif %}" ], "description": [ + "{% if tags.building == 'yes' and tags.military %}", + "{{ tagTrans('building', 'military') }}", + "{% elseif tags.building == 'yes' %}", + "{{ keyTrans('building') }}", + "{% else %}", + "{{ tagTransList('building', tags.building) }}", + "{% endif %}", + "{% if tags.building == 'construction' and tags.construction %}", + "({{ tagTransList('building', tags.construction) }})", + "{% endif %}", + "{% if tags.building in [ 'yes', 'military' ] and tags.military %}", + "({{ tagTransList('military', tags.military) }})", + "{% endif %}" + ], + "details": [ "{% if tags.height is defined %}", " {% if tags.height|matches('(m|ft)$') %}{{ tags.height -}}", " {% else %}{{ tags.height }} m", diff --git a/buildings-start_date.json b/buildings-start_date.json index 599a85e7..d8e77989 100644 --- a/buildings-start_date.json +++ b/buildings-start_date.json @@ -16,6 +16,9 @@ }, "feature": { "pre": [ + "{% set type = tags.building|split(';')[0] %}", + "{% if tags.military %}{% set type = 'military' %}{% endif %}", + "", "{% set start_date = tags.start_date %}", "{% if attribute(tags, 'building:start_date') %}{% set start_date = attribute(tags, 'building:start_date') %}{% endif %}", "{# Deprecated tags #}", @@ -59,6 +62,21 @@ "{% endif %}" ], "description": [ + "{% if tags.building == 'yes' and tags.military %}", + "{{ tagTrans('building', 'military') }}", + "{% elseif tags.building == 'yes' %}", + "{{ keyTrans('building') }}", + "{% else %}", + "{{ tagTransList('building', tags.building) }}", + "{% endif %}", + "{% if tags.building == 'construction' and tags.construction %}", + "({{ tagTransList('building', tags.construction) }})", + "{% endif %}", + "{% if tags.building in [ 'yes', 'military' ] and tags.military %}", + "({{ tagTransList('military', tags.military) }})", + "{% endif %}" + ], + "details": [ "{% if start_date %}", "{{ start_date|osmFormatDate({ format: 'short' }) }}", "{% else %}", diff --git a/car_amenities.json b/car_amenities.json index 97e47da0..da6d0c09 100644 --- a/car_amenities.json +++ b/car_amenities.json @@ -17,18 +17,16 @@ "query": { "13": [ "(", - "node[amenity~\"^(car_rental|car_sharing|fuel)$\"];", - "way[amenity~\"^(car_rental|car_sharing|fuel)$\"];", - "relation[amenity~\"^(car_rental|car_sharing|fuel)$\"];", - "node[amenity~\"^(charging_station)$\"][car!=\"no\"];", - "node[amenity~\"^(charging_station)$\"][motorcycle!=\"no\"];", + "nwr[amenity~\"^(car_rental|car_sharing|fuel)$\"];", + "nwr[amenity~\"^(charging_station)$\"][motorcar][motorcar!=\"no\"];", + "nwr[amenity~\"^(charging_station)$\"][motorcycle][motorcycle!=\"no\"];", ")" ], "16": [ "(", - "node[amenity~\"^(car_rental|car_sharing|car_wash|charging_station|fuel|motorcycle_parking|parking)$\"];", - "way[amenity~\"^(car_rental|car_sharing|car_wash|charging_station|fuel|motorcycle_parking|parking)$\"];", - "relation[amenity~\"^(car_rental|car_sharing|car_wash|charging_station|fuel|motorcycle_parking|parking)$\"];", + "nwr[amenity~\"^(car_rental|car_sharing|car_wash|fuel|motorcycle_parking|parking)$\"];", + "nwr[amenity~\"^(charging_station)$\"][motorcar][motorcar!=\"no\"];", + "nwr[amenity~\"^(charging_station)$\"][motorcycle][motorcycle!=\"no\"];", ")" ] }, diff --git a/car_maxspeed.json b/car_maxspeed.json index b5047331..9805d07a 100644 --- a/car_maxspeed.json +++ b/car_maxspeed.json @@ -93,7 +93,8 @@ "{% set colorB = colorInterpolate(const.colorMap, (maxspeedBKmh - const.offsetColorSpeed) / const.highestColorSpeed) %}", "{% endif %}" ], - "description": [ + "description": "{{ tagTransList('highway', tags.highway) }}", + "details": [ "{% if maxspeedF or maxspeedB %}", "{{ maxspeedB == 'other' ? attribute(tags, 'maxspeed:backward') : const.colorOther[maxspeedB] ? tagTrans('maxspeed', maxspeedB) : maxspeedB|default(trans('unknown')) }} / {{ maxspeedF == 'other' ? attribute(tags, 'maxspeed:forward') : const.colorOther[maxspeedF] ? tagTrans('maxspeed', maxspeedF) : maxspeedF|default(trans('unknown')) }} {{ unit }}", "{% elseif maxspeed %}", diff --git a/car_routes.json b/car_routes.json index d1c7734c..a60530a4 100644 --- a/car_routes.json +++ b/car_routes.json @@ -13,7 +13,7 @@ "feature": { "pre": "{% set color = '#' ~ tags.network|default('')|md5|slice(0, 6) %}", "description": "{% if tags.network %}{{ tagTrans('network', tags.network) }}{% endif %}", - "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}", + "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}", "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': color })|raw }}", "markerSymbol": "", "styles": "" diff --git a/communication.json b/communication.json index 3053b3e8..3382980b 100644 --- a/communication.json +++ b/communication.json @@ -22,23 +22,25 @@ "query": { "13": [ "(", - "node[amenity~'^(post_office|internet_cafe)$'];", - "way[amenity~'^(post_office|internet_cafe)$'];", - "relation[amenity~'^(post_office|internet_cafe)$'];", + "nwr[amenity~'^(post_office|internet_cafe)$'];", "nwr[office~\"^(telecommunication|it|newspaper|publisher|advertising_agency)$\"];", ");" ], - "16": [ - "(node[amenity~'^(post_office|internet_cafe|post_box|telephone)$'];", - "way[amenity~'^(post_office|internet_cafe)$'];", - "relation[amenity~'^(post_office|internet_cafe)$'];", + "15": [ + "(", + "nwr[amenity~'^(post_office|internet_cafe|post_box|parcel_locker|telephone)$'];", "nwr[office~\"^(telecommunication|it|newspaper|publisher|advertising_agency)$\"];", + "nwr[vending~\"^(|.*;)parcel_pickup(;.*|)$\"];", + "nwr[vending~\"^(|.*;)parcel_mail_in(;.*|)$\"];", ");" ] }, "feature": { "pre": [ - "{% if tags.amenity %}", + "{% if tags.vending %}", + " {% set key = 'amenity' %}", + " {% set value = 'parcel_locker' %}", + "{% elseif tags.amenity %}", " {% set key = 'amenity' %}", " {% set value = tags.amenity %}", "{% else %}", @@ -46,12 +48,11 @@ " {% set value = tags.office %}", "{% endif %}" ], - "title": "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) |default(tagTrans('amenity', tags.amenity)) }}", "description": [ "{% if key == 'office' %}", " {{ keyTrans('office') }} ({{ tagTrans('office', tags.office) }})", "{% else %}", - " {{ tagTrans(key, value) }}", + " {{ tagTransList(key, value) }}", "{% endif %}" ], "body": "{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}
{% endif %}", @@ -65,7 +66,7 @@ "info": [ "", "{% for kv, data in const %}", - "{% if data.zoom <= map.zoom %}", + "{% if data.zoom <= map.zoom and not data.info_hide %}", " ", " ", "
{{ markerCircle({})|raw }}
{{ data.sign|raw }}
", @@ -94,6 +95,20 @@ "sign": "", "zoom": 13 }, + "amenity=parcel_locker": { + "sign": "", + "zoom": 16 + }, + "vending=parcel_pickup": { + "sign": "", + "info_hide": true, + "zoom": 16 + }, + "vending=parcel_mail_in": { + "sign": "", + "info_hide": true, + "zoom": 16 + }, "office=telecommunication": { "sign": "", "zoom": 13 diff --git a/culture_religion.json b/culture_religion.json index 17c8e164..fa89b4a7 100644 --- a/culture_religion.json +++ b/culture_religion.json @@ -31,6 +31,9 @@ { "id": "memorial" }, + { + "id": "heritage" + }, { "id": "religion" }, diff --git a/cycle_amenities.json b/cycle_amenities.json index 925ade8a..50a0ac51 100644 --- a/cycle_amenities.json +++ b/cycle_amenities.json @@ -13,7 +13,7 @@ "node[amenity~\"^(bicycle_rental)$\"];", "way[amenity~\"^(bicycle_rental)$\"];", "relation[amenity~\"^(bicycle_rental)$\"];", - "node[amenity~\"^(charging_station)$\"][bicycle!=\"no\"];", + "node[amenity~\"^(charging_station)$\"][bicycle][bicycle!=\"no\"];", "node[shop~\"^(bicycle)$\"];", "way[shop~\"^(bicycle)$\"];", "relation[shop~\"^(bicycle)$\"];", @@ -24,7 +24,7 @@ "node[amenity~\"^(bicycle_.*|compressed_air)$\"];", "way[amenity~\"^(bicycle_.*|compressed_air)$\"];", "relation[amenity~\"^(bicycle_.*|compressed_air)$\"];", - "node[amenity~\"^(charging_station)$\"][bicycle!=\"no\"];", + "node[amenity~\"^(charging_station)$\"][bicycle][bicycle!=\"no\"];", "node[shop~\"^(bicycle)$\"];", "way[shop~\"^(bicycle)$\"];", "relation[shop~\"^(bicycle)$\"];", @@ -56,7 +56,7 @@ "{% set constIndex = (key ~ \"=\" ~ value) %}" ], "title": [ - "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) | default(trans('unnamed')) }}", + "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) }}", "", "{% if tags.capacity %}({{ tags.capacity }}){% endif %}" ], diff --git a/cycle_routes.json b/cycle_routes.json index a3c5ceb5..16d8f6e7 100644 --- a/cycle_routes.json +++ b/cycle_routes.json @@ -9,18 +9,24 @@ "pt-br": "Ciclorrotas" }, "query": { - "6": "relation[type=route][route~\"(|.*;)bicycle(|;.*)\"][network~'^(icn)$']", - "9": "relation[type=route][route~\"(|.*;)bicycle(|;.*)\"][network~'^(icn|ncn)$']", - "12": "relation[type=route][route~\"(|.*;)bicycle(|;.*)\"][network~'^(icn|ncn|rcn)$']", - "15": "relation[type=route][route~\"(|.*;)bicycle(|;.*)\"]" + "6": "relation[type=route][route~\"^(|.*;)bicycle(|;.*)$\"][network~'^(|.*;)(icn)(|;.*)$']", + "9": "relation[type=route][route~\"^(|.*;)bicycle(|;.*)$\"][network~'^(|.*;)(icn|ncn)(|;.*)$']", + "12": "relation[type=route][route~\"^(|.*;)bicycle(|;.*)$\"][network~'^(|.*;)(icn|ncn|rcn)(|;.*)$']", + "15": "relation[type=route][route~\"^(|.*;)bicycle(|;.*)$\"]" }, "members": true, "feature": { - "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}", - "description": "{{ tagTrans('network', tags.network) }}", + "pre": [ + "{% set network = tags.network %}", + "{% for n in tags.network|split(';') %}", + "{% if n|matches('cn$') %}{% set network = n %}{% endif %}", + "{% endfor %}" + ], + "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}", + "description": "{{ tagTrans('network', network) }}", "markerSymbol": "", - "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network].color|default(const[''].color) })|raw }}", - "priority": "{{ const[tags.network].priority|default(4) }}", + "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[network].color|default(const[''].color) })|raw }}", + "priority": "{{ const[network].priority|default(4) }}", "styles": "", "style:hover": { "width": "0" @@ -40,10 +46,14 @@ "{% set selected = false %}", "", "{% for master in masters %}", - " {% set _p = const[master.tags.network].priority|default(4) %}", + " {% set masterNetwork = '' %}", + " {% for n in master.tags.network|split(';') %}", + " {% if n|matches('cn$') %}{% set masterNetwork = n %}{% endif %}", + " {% endfor %}", + " {% set _p = const[masterNetwork].priority|default(4) %}", " {% if _p < priority %}", " {% set priority = _p %}", - " {% set network = master.tags.network %}", + " {% set network = masterNetwork %}", " {% endif %}", " {% if master.tags.ref %}", " {% set refs = refs|merge([ master.tags.ref ]) %}", @@ -61,11 +71,19 @@ "

Routes

", "" ], diff --git a/detailsBody.html b/detailsBody.html index 9bb09596..4cf13291 100644 --- a/detailsBody.html +++ b/detailsBody.html @@ -21,6 +21,20 @@ {% endif %} +{% set address = tagsPrefix(tags, 'contact:') %} +{% if address %} +
  • + + {{ keyTrans('address') }}: + + {{ attribute(tags, 'contact:street') }} + {{ attribute(tags, 'contact:housenumber') }}, + {{ attribute(tags, 'contact:postcode') }} + {{ attribute(tags, 'contact:city') }} + +
  • +{% endif %} + {% if attribute(tags, 'name:etymology') %}
  • diff --git a/gastro.json b/gastro.json index eaf7a123..667b8580 100644 --- a/gastro.json +++ b/gastro.json @@ -23,6 +23,7 @@ }, "feature": { "description": "{{ tagTrans('amenity', tags.amenity) }}", + "details": "{{ tagTransList('cuisine', tags.cuisine) }}", "body": [ "
      ", "
    • ", diff --git a/heritage.json b/heritage.json new file mode 100644 index 00000000..59fae5d5 --- /dev/null +++ b/heritage.json @@ -0,0 +1,28 @@ +{ + "type": "overpass", + "query": { + "8": "nwr[heritage~\"^(|.*;)1(|;.*)$\"];", + "11": "nwr[heritage~\"^(|.*;)(1|2)(|;.*)$\"];", + "13": "nwr[heritage];" + }, + "feature": { + "description": [ + "{% set found = false %}", + "{% for k in ['amenity', 'shop', 'telecom', 'waterway', 'craft', 'highway', 'railway', 'aerialway', 'emergency', 'geological', 'man_made', 'natural', 'office', 'power', 'aeroway', 'tourism', 'leisure', 'military', 'landuse', 'barrier', 'route'] if not found %}", + " {% if attribute(tags, k) and attribute(tags, k) != 'yes' %}", + " {{ tagTransList(k, attribute(tags, k)) }}", + " {% set found = true %}", + " {% endif %}", + "{% endfor %}", + "{% if found %}{# nothing #}", + "{% elseif tags.building and tags.building != 'yes' %}", + "{{ tagTransList('building', tags.building) }}", + "{% elseif tags.historic and tags.historic not in ['heritage', 'yes', 'building'] %}", + "{{ tagTransList('historic', tags.historic) }}", + "{% elseif tags.building == 'yes' or tags.historic == 'building' %}", + "{{ keyTrans('building') }}", + "{% endif %}" + ], + "priority": "{{ min(tags.heritage|split(\";\")) }}" + } +} diff --git a/hiking_routes.json b/hiking_routes.json index 53ce1e5a..3ba0c5f0 100644 --- a/hiking_routes.json +++ b/hiking_routes.json @@ -9,17 +9,23 @@ "pt-br": "Rotas de caminhada" }, "query": { - "10": "relation[type=route][route~\"(|.*;)hiking(|;.*)\"][network~\"^(iwn)$\"]", - "11": "relation[type=route][route~\"(|.*;)hiking(|;.*)\"][network~\"^(iwn|nwn)$\"]", - "12": "relation[type=route][route~\"(|.*;)hiking(|;.*)\"][network~\"^(iwn|nwn|rwn)$\"]", - "14": "relation[type=route][route~\"(|.*;)hiking(|;.*)\"]" + "10": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"][network~\"^(|.*;)(iwn)(|;.*)$\"]", + "11": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"][network~\"^(|.*;)(iwn|nwn)(|;.*)$\"]", + "12": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"][network~\"^(|.*;)(iwn|nwn|rwn)(|;.*)$\"]", + "14": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"]" }, "members": true, "feature": { - "priority": "{{ const[tags.network].priority|default(4) }}", - "description": "{% if tags.network %}{{ tagTrans('network', tags.network) }}{% endif %}", - "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network|default('')].color|default(const[''].color) })|raw }}", - "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}", + "pre": [ + "{% set network = tags.network %}", + "{% for n in tags.network|split(';') %}", + "{% if n|matches('wn$') %}{% set network = n %}{% endif %}", + "{% endfor %}" + ], + "priority": "{{ const[network].priority|default(4) }}", + "description": "{% if network %}{{ tagTrans('network', network) }}{% endif %}", + "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[network|default('')].color|default(const[''].color) })|raw }}", + "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}", "styles": "", "markerSymbol": "" }, @@ -30,10 +36,14 @@ "{% set refs = [] %}", "", "{% for master in masters %}", - " {% set _p = const[master.tags.network].priority|default(4) %}", + " {% set masterNetwork = '' %}", + " {% for n in master.tags.network|split(';') %}", + " {% if n|matches('wn$') %}{% set masterNetwork = n %}{% endif %}", + " {% endfor %}", + " {% set _p = const[masterNetwork].priority|default(4) %}", " {% if _p < priority %}", " {% set priority = _p %}", - " {% set network = master.tags.network %}", + " {% set network = masterNetwork %}", " {% endif %}", " {% if master.tags.ref %}", " {% set refs = refs|merge([ master.tags.ref ]) %}", @@ -44,11 +54,19 @@ "

      Routes

      ", "" ], diff --git a/lang/de.json b/lang/de.json index bf640db9..9820e522 100644 --- a/lang/de.json +++ b/lang/de.json @@ -32,6 +32,7 @@ "category:gastro": "Gastronomie", "category:gastro-smoking": "Rauchfreie Gastronomie", "category:health": "Gesundheitsdienste", + "category:heritage": "Denkmalschutz", "category:hiking_routes": "Wanderrouten", "category:historic": "Geschichte", "category:index": "", diff --git a/lang/en.json b/lang/en.json index 03ed02d4..c97dad07 100644 --- a/lang/en.json +++ b/lang/en.json @@ -34,6 +34,7 @@ "category:gastro": "Gastronomy", "category:gastro-smoking": "Smokefree Gastronomy", "category:health": "Health", + "category:heritage": "Heritage Protection", "category:hiking_routes": "Hiking routes", "category:historic": "Historic", "category:index": "Index of Categories", diff --git a/mtb-routes.json b/mtb-routes.json index b7930618..2d0d5242 100644 --- a/mtb-routes.json +++ b/mtb-routes.json @@ -13,7 +13,7 @@ "feature": { "description": "{{ tagTrans('route', 'mtb') }}", "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': '#007fff' })|raw }}", - "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}", + "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}", "styles": "", "markerSymbol": "" }, diff --git a/natural.json b/natural.json index 32d48197..f0d2bf39 100644 --- a/natural.json +++ b/natural.json @@ -52,10 +52,7 @@ "{% set value = tags.natural %}", "{% endif %}" ], - "title": [ - "{{ localizedTag(tags, 'name') | default(trans('unnamed')) }}", - "{% if tags.natural == 'peak' and tags.ele %}({{ tags.ele }}m){% endif %}" - ], + "details": "{% if tags.natural == 'peak' and tags.ele %}{{ tags.ele }}m{% endif %}", "description": "{{ tagTrans(key, value) }}", "style": { "color": "{{ const[value].color|default('#f2756a') }}" @@ -225,7 +222,7 @@ }, "volcano": { "zoom": 9, - "sign": "", + "sign": "", "color": "#cf3a00", "group": "landform" }, diff --git a/popupBody.html b/popupBody.html index 99016bfc..462f1132 100644 --- a/popupBody.html +++ b/popupBody.html @@ -21,6 +21,20 @@
    • {% endif %} +{% set address = tagsPrefix(tags, 'contact:') %} +{% if address %} +
    • + + {{ keyTrans('address') }}: + + {{ attribute(tags, 'contact:street') }} + {{ attribute(tags, 'contact:housenumber') }}, + {{ attribute(tags, 'contact:postcode') }} + {{ attribute(tags, 'contact:city') }} + +
    • +{% endif %} + {% if attribute(tags, 'name:etymology') %}
    • diff --git a/power_routes.json b/power_routes.json index e90591c5..7794763b 100644 --- a/power_routes.json +++ b/power_routes.json @@ -13,7 +13,7 @@ "feature": { "pre": "{% set color = '#' ~ tags.operator|default('')|md5|slice(0, 6) %}", "description": "{% if tags.operator %}{{ tags.operator }}{% endif %}", - "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}", + "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}", "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': color })|raw }}", "markerSymbol": "", "styles": "" diff --git a/pt.json b/pt.json index 6bbd5aca..d78e8b67 100644 --- a/pt.json +++ b/pt.json @@ -54,7 +54,7 @@ "title": [ "{% if tags.ref %}{{ tags.ref }} - {% endif %}", "", - "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) | default(trans('unnamed')) }}" + "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) }}" ], "description": "{{ tagTrans('route', tags.route) }}", "body": [ @@ -128,9 +128,13 @@ "{% for master in masters %}", " {% if master.tags.public_transport != 'stop_area' %}", "
    • ", - "
      {{ markerCircle({fillColor:const[master.tags.route].color})|raw }}
      {{ const[master.tags.route].sign|raw }}
      ", - " {% if master.tags.ref and master.tags.name %}{{ master.tags.ref }} - {{ master.tags.name|default(master.tags.ref) }}{% elseif master.tags.ref %}{{ master.tags.ref }}{% elseif master.tags.name %}{{ master.tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}", - " {{ tagTrans('route', master.tags.route) }}", + " ", + "
      {{ markerCircle({fillColor:const[master.tags.route].color})|raw }}
      {{ const[master.tags.route].sign|raw }}
      ", + "
      ", + "
      {{ tagTrans('route', master.tags.route) }}
      ", + "
      {% if master.tags.ref and master.tags.name %}{{ master.tags.ref }} - {{ master.tags.name|default(master.tags.ref) }}{% elseif master.tags.ref %}{{ master.tags.ref }}{% elseif master.tags.name %}{{ master.tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}
      ", + "
      ", + "
      ", "
    • ", " {% endif %}", "{% endfor %}", @@ -178,8 +182,16 @@ "listStopsMarkerSign": null, "listStopsMarkerSymbol": "{{ markerCircle({ width: 5, color: color, fillOpacity: '1', radius: 3 })|raw }}", "listStopsExclude": "{{ not isStop or stopCount == 0 }}", - "listStopsTitle": "{% if tags %}{{ tags.name|default(stopName)|default(trans('unknown')) }}{% else %}
    • {{ trans('loading') }}
    • {% endif %}", - "listStopsDescription": "{{ refs|join(' · ') }}", + "listStopsTitle": [ + "{% if tags %}{{ tags.name|default(stopName)|default(trans('unknown')) }}{% else %}
    • {{ trans('loading') }}
    • {% endif %}
      ", + "{{ refs|join(' · ') }}" + ], + "description": [ + "{% set stopTypes = [] %}", + "{% if tags.railway in ['tram_stop'] %}{% set stopTypes = stopTypes|merge([ tagTrans('railway', tags.railway) ]) %}{% endif %}", + "{% if tags.highway in ['bus_stop'] %}{% set stopTypes = stopTypes|merge([ tagTrans('highway', tags.highway) ]) %}{% endif %}", + "{% if stopTypes|length %}{{ enumerate(stopTypes) }}{% elseif isStop %}{{ tagTrans('public_transport', 'stop_position') }}{% else %}{{ keyTrans('route') }}{% endif %}" + ], "listRoutesExclude": "true", "style:stop": { "width": "4", @@ -195,7 +207,7 @@ "dashArray": "{% if not dirForward or not dirBackward %}27,8{% endif %}", "dashOffset": "{% if dirBackward %}28{% else %}0{% endif %}", "noClip": "{% if not dirForward or not dirBackward %}true{% else %}false{% endif %}", - "text": "{{ refs|join(' · ') }} ", + "text1": "{{ refs|join(' · ') }} ", "textRepeat": "1", "textOffset": "12", "pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}", diff --git a/public.json b/public.json index 3c95f11e..2421b81b 100644 --- a/public.json +++ b/public.json @@ -53,7 +53,6 @@ "{% set value = tags.office %}", "{% endif %}" ], - "title": "{{ tags.name|default(tags.operator)|default(tagTrans('amenity', value)) }}", "description": [ "{% if key == 'office' %}", " {{ keyTrans('office') }} ({{ tagTrans('office', tags.office) }})", diff --git a/railway-electrification.json b/railway-electrification.json index 66bb031b..01fd6182 100644 --- a/railway-electrification.json +++ b/railway-electrification.json @@ -44,14 +44,13 @@ " {% endif %}", "{% endif %}" ], - "title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator'))|default(trans('unnamed')) }}", - "description": [ - "{{ tagTrans('railway', tags.railway) }}", - "", + "title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator')) }}", + "description": "{{ tagTrans('railway', tags.railway) }}", + "details": [ "{% if tags.electrified == 'no' %}", - " - {{ tagTrans('electrified', 'no') }}", + "{{ tagTrans('electrified', 'no') }}", "{% elseif tags.electrified %}", - " - {{ tags.voltage|default(trans('unknown')) }}V, {{ tags.frequency|default(trans('unknown')) }}Hz", + "{{ tags.voltage|default(trans('unknown')) }}V, {{ tags.frequency|default(trans('unknown')) }}Hz", "{% endif %}" ], "body": [ diff --git a/railway-gauge.json b/railway-gauge.json index 4771b27c..f9a80464 100644 --- a/railway-gauge.json +++ b/railway-gauge.json @@ -12,8 +12,9 @@ "{% set gauges = tags.gauge|split(';')|sort|reverse %}", "{% set width = max(3, 3 / map.metersPerPixel) %}" ], - "title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator'))|default(trans('unnamed')) }}", - "description": "{{ tags.gauge|default(trans('unknown'))|enumerate }}", + "title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator')) }}", + "description": "{{ tagTrans('railway', tags.railway) }}", + "details": "{{ tags.gauge|default(trans('unknown'))|enumerate }}", "body": [ "{{ tagTrans('railway', tags.railway) }}
      ", "{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}
      {% endif %}", diff --git a/railway-infrastructure.json b/railway-infrastructure.json index 93810487..43edcc65 100644 --- a/railway-infrastructure.json +++ b/railway-infrastructure.json @@ -14,7 +14,7 @@ "17": "(node[railway];way[railway];)" }, "feature": { - "title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator'))|default(trans('unnamed')) }}", + "title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator')) }}", "description": [ "{{ tagTrans('railway', tags.railway) -}}", "{%- if tags.usage %}", diff --git a/railway-routes.json b/railway-routes.json index f06a1d37..f163c5c3 100644 --- a/railway-routes.json +++ b/railway-routes.json @@ -14,7 +14,7 @@ "pre": "{% set color = '#' ~ tags.operator|default('')|md5|slice(0, 6) %}", "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': color })|raw }}", "description": "{{ tags.operator }}", - "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}", + "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}", "styles": "", "markerSymbol": "" }, diff --git a/religion.json b/religion.json index 7e3c5aa7..5c1df926 100644 --- a/religion.json +++ b/religion.json @@ -63,15 +63,15 @@ " {% if isTranslated('tag:building=' ~ tags.building ~ ' religion=' ~ tags.religion) %}", " {{ trans('tag:building=' ~ tags.building ~ ' religion=' ~ tags.religion) }}", " {% elseif tags.building != 'yes' %}", - " {{ trans('tag:building=' ~ tags.building) }}{% if tags.religion %}: {{ tagTransList('religion', tags.religion) }}{% endif %}", + " {{ trans('tag:building=' ~ tags.building) }}", " {% else %}", - " {{ tagTrans(key, value) }}: {{ tagTransList('religion', tags.religion) }}", + " {{ tagTrans(key, value) }}", " {% endif %}", "{% else %}", - " {{ tagTrans(key, value) }}{% if tags.religion %}: {{ tagTransList('religion', tags.religion) }}{% endif %}", + " {{ tagTrans(key, value) }}", "{% endif %}" ], - "popupDescription": "{{ tagTrans(key, value) }}", + "listDetails": "{{ tagTransList('religion', tags.religion) }}{% if tags.denomination %} - {{ tagTransList('denomination', tags.denomination) }}{% endif %}", "body": [ "{% if tags.building %}", " {{ keyTrans('building') }}: {{ tagTrans('building', tags.building) }}
      ", diff --git a/sport.json b/sport.json index eb0ef332..de8bc35a 100644 --- a/sport.json +++ b/sport.json @@ -20,8 +20,18 @@ "14": "(node[sport];way[sport];relation[sport];)" }, "feature": { - "title": "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) |default(tagTransList('sport', tags.sport)) }}", - "description": "{{ tagTransList('sport', tags.sport) }}", + "description": [ + "{% if tags.leisure %}{{ tagTrans('leisure', tags.leisure) }}", + "{% elseif tags.amenity %}{{ tagTrans('amenity', tags.amenity) }}", + "{% elseif tags.shop %}{{ tags.shop == 'yes' ? keyTrans('shop') : tagTrans('shop', tags.shop) }}", + "{% elseif tags.landuse %}{{ tagTrans('landuse', tags.landuse) }}", + "{% elseif tags.building %}{{ tags.building == 'yes' ? keyTrans('building') : tagTrans('building', tags.building) }}", + "{% elseif tags.highway %}{{ tagTrans('highway', tags.highway) }}", + "{% else %}{{ keyTrans('sport') }}", + "{% endif %}" + ], + "listDetails": "{{ tagTransList('sport', tags.sport) }}", + "body": "{{ keyTrans('sport') }}: {{ tagTransList('sport', tags.sport) }}", "markerSign": [ "{% set firstSport = tags.sport|split(';')[0] %}", "{{ const[firstSport] }}" diff --git a/swimming_bathing.json b/swimming_bathing.json index 98e8aee6..e4994530 100644 --- a/swimming_bathing.json +++ b/swimming_bathing.json @@ -11,10 +11,10 @@ "13": [ "(", "nwr[leisure=swimming_area];", - "nwr[natural~\"^(water)\"][sport~\"^(|.*;)swimming(.*|)$\"];", + "nwr[natural~\"^(water)\"][sport~\"^(|.*;)swimming(;.*|)$\"];", "nwr[natural~\"^(beach)\"];", "nwr[leisure~\"^(water_park|beach_resort)$\"];", - "nwr[leisure=sports_centre][sport~\"^(|.*;)swimming(.*|)$\"];", + "nwr[leisure=sports_centre][sport~\"^(|.*;)swimming(;.*|)$\"];", "nwr[amenity=public_bath];", "nwr[tourism=spa_resort];", ")" @@ -22,7 +22,7 @@ "16": [ "(", "nwr[leisure=swimming_area];", - "nwr[natural~\"^(water)\"][sport~\"^(|.*;)swimming(.*|)$\"];", + "nwr[natural~\"^(water)\"][sport~\"^(|.*;)swimming(;.*|)$\"];", "nwr[natural~\"^(beach)\"];", "nwr[leisure~\"^(water_park|beach_resort)$\"];", "nwr[leisure=sports_centre][sport~\"^(|.*;)swimming(;.*|)$\"];",