From 802ccfc94fbad961e5db38d475050847d971d50f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 26 Nov 2017 06:12:57 +0100 Subject: [PATCH] Sort properties always by the same order --- buildings.json | 6 ++-- car_maxspeed.json | 4 +-- children.json | 4 +-- communication.json | 4 +-- cycle_amenities.json | 10 +++--- cycle_routes.json | 9 +++-- education.json | 4 +-- gastro.json | 4 +-- index.json | 37 ++++++++++---------- places.json | 4 +-- places_geo.json | 2 +- power.json | 8 ++--- pt_routes.json | 4 +-- public.json | 4 +-- railway-electrification.json | 68 ++++++++++++++++++------------------ railway-infrastructure.json | 54 ++++++++++++++-------------- religion.json | 4 +-- sport.json | 4 +-- walk_amenities.json | 2 +- works.json | 5 ++- 20 files changed, 118 insertions(+), 123 deletions(-) diff --git a/buildings.json b/buildings.json index 432ef014..8c16eb3e 100644 --- a/buildings.json +++ b/buildings.json @@ -13,6 +13,7 @@ ] }, "feature": { + "markerSign": null, "priority": [ "{% set p = 100 %}", "{% if tags.name %}{% set p = p - 10 %}{% endif %}", @@ -26,11 +27,10 @@ "{% if tags.tourism %}{% set p = p - 1 %}{% endif %}", "{{ p }}" ], - "markerSign": null, "style": { - "fillColor": "#000000", + "weight": "1", "color": "#000000", - "weight": "1" + "fillColor": "#000000" } } } diff --git a/car_maxspeed.json b/car_maxspeed.json index 4d1c3ca9..9e31a5f0 100644 --- a/car_maxspeed.json +++ b/car_maxspeed.json @@ -46,9 +46,9 @@ "{{ trans('unknown') }}", "{% endif %}" ], + "markerSign": null, "style": { "color": "{{ color }}" - }, - "markerSign": null + } } } diff --git a/children.json b/children.json index 47d41478..57fe5604 100644 --- a/children.json +++ b/children.json @@ -8,7 +8,7 @@ "15": "(node[leisure~'^(playground|summer_camp|indoor_play)$'];way[leisure~'^(playground|summer_camp|indoor_play)$'];relation[leisure~'^(playground|summer_camp|indoor_play)$'];node[shop~'^(baby_goods|toys)$'];way[shop~'^(baby_goods|toys)$'];relation[shop~'^(baby_goods|toys)$'];node[amenity=toilets][diaper];way[amenity=toilets][diaper];relation[amenity=toilets][diaper];node[kids_area];way[kids_area];relation[kids_area];);" }, "feature": { - "markerSign": "{% if tags.leisure=='playground' %}⛹{% elseif tags.leisure=='summer_camp'%}🏕{% elseif tags.leisure=='indoor_play' or tags.kids_area %}🏠{% elseif tags.shop=='baby_goods' or tags.shop=='toys' %}{% elseif tags.amenity=='toilets' and tags.diaper %}🚽🚼{% endif %}", - "description": "{% if tags.leisure=='playground' %}{{ tagTrans('leisure', 'playground') }}{% elseif tags.leisure=='summer_camp'%}{{ tagTrans('leisure', 'summer_camp') }}{% elseif tags.leisure=='indoor_play' %}{{ tagTrans('leisure', 'indoor_play') }}{% elseif tags.kids_area %}{{ keyTrans('kids_area') }}{% elseif tags.shop=='baby_goods' or tags.shop=='toys' %}{{ keyTrans('shop') }}: {{ tagTrans('shop', tags.shop) }}{% elseif tags.amenity=='toilets' and tags.diaper %}{{ tagTrans('amenity', 'toilets') }} with diaper changing table{% endif %}" + "description": "{% if tags.leisure=='playground' %}{{ tagTrans('leisure', 'playground') }}{% elseif tags.leisure=='summer_camp'%}{{ tagTrans('leisure', 'summer_camp') }}{% elseif tags.leisure=='indoor_play' %}{{ tagTrans('leisure', 'indoor_play') }}{% elseif tags.kids_area %}{{ keyTrans('kids_area') }}{% elseif tags.shop=='baby_goods' or tags.shop=='toys' %}{{ keyTrans('shop') }}: {{ tagTrans('shop', tags.shop) }}{% elseif tags.amenity=='toilets' and tags.diaper %}{{ tagTrans('amenity', 'toilets') }} with diaper changing table{% endif %}", + "markerSign": "{% if tags.leisure=='playground' %}⛹{% elseif tags.leisure=='summer_camp'%}🏕{% elseif tags.leisure=='indoor_play' or tags.kids_area %}🏠{% elseif tags.shop=='baby_goods' or tags.shop=='toys' %}{% elseif tags.amenity=='toilets' and tags.diaper %}🚽🚼{% endif %}" } } diff --git a/communication.json b/communication.json index 1a7f6441..43c3f04f 100644 --- a/communication.json +++ b/communication.json @@ -23,8 +23,8 @@ }, "feature": { "title": "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) |default(tagTrans('amenity', tags.amenity)) }}", - "markerSign": "{% if tags.amenity=='post_office' %}🏤{% elseif tags.amenity=='post_box'%}📮{% elseif tags.amenity=='internet_cafe' %}💻{% elseif tags.amenity=='telephone' %}✆{% endif %}", + "description": "{{ tagTrans('amenity', tags.amenity) }}", "body": "{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}
{% endif %}", - "description": "{{ tagTrans('amenity', tags.amenity) }}" + "markerSign": "{% if tags.amenity=='post_office' %}🏤{% elseif tags.amenity=='post_box'%}📮{% elseif tags.amenity=='internet_cafe' %}💻{% elseif tags.amenity=='telephone' %}✆{% endif %}" } } diff --git a/cycle_amenities.json b/cycle_amenities.json index 765554bb..22332c20 100644 --- a/cycle_amenities.json +++ b/cycle_amenities.json @@ -50,6 +50,11 @@ "", "{% set constIndex = (key ~ \"=\" ~ value) %}" ], + "title": [ + "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) | default(trans('unnamed')) }}", + "", + "{% if tags.capacity %}({{ tags.capacity }}){% endif %}" + ], "description": "{{ tagTrans(key, value) }}", "body": [ "{% if tags.capacity %}", @@ -57,11 +62,6 @@ "{% endif %}" ], "markerSign": "{{ const[constIndex]['sign'] }}", - "title": [ - "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) | default(trans('unnamed')) }}", - "", - "{% if tags.capacity %}({{ tags.capacity }}){% endif %}" - ], "priority": [ "{% if const[constIndex] and const[constIndex]['priority']['capacity'] %}", " {% set max=const[constIndex]['priority']['default'] %}", diff --git a/cycle_routes.json b/cycle_routes.json index ad0be822..a3d96f3c 100644 --- a/cycle_routes.json +++ b/cycle_routes.json @@ -1,22 +1,21 @@ { + "type": "overpass", "name": { "de": "Radrouten", "en": "Cycle Routes" }, - "type": "overpass", "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]" }, - "minZoom": 6, "feature": { + "priority": "{% if tags.network=='icn' %}0{% elseif tags.network=='ncn' %}1{% elseif tags.network=='rcn' %}2{% else %}3{% endif %}", "style": { - "color": "{% if tags.network=='icn' %}#ff0000{% elseif tags.network=='ncn' %}#ff007f{% elseif tags.network=='rcn' %}#7f00ff{% else %}#0000ff{% endif %}", "weight": 4, + "color": "{% if tags.network=='icn' %}#ff0000{% elseif tags.network=='ncn' %}#ff007f{% elseif tags.network=='rcn' %}#7f00ff{% else %}#0000ff{% endif %}", "opacity": 1 - }, - "priority": "{% if tags.network=='icn' %}0{% elseif tags.network=='ncn' %}1{% elseif tags.network=='rcn' %}2{% else %}3{% endif %}" + } } } diff --git a/education.json b/education.json index 9cfbee8b..6372d644 100644 --- a/education.json +++ b/education.json @@ -22,9 +22,9 @@ "16": "(node[amenity~'^(college|university|library|school|kindergarten|public_bookcase)$'];way[amenity~'^(college|university|library|school|kindergarten|public_bookcase)$'];relation[amenity~'^(college|university|library|school|kindergarten|public_bookcase)$'];)" }, "feature": { - "markerSign": "{% if tags.amenity == 'university' or tags.amenity == 'college' %}🎓{% elseif tags.amenity == 'library' %}🕮{% elseif tags.amenity == 'school' or tags.amenity == 'language_school' %}🏫{% elseif tags.amenity == 'kindergarten' %}⛹{% elseif tags.amenity == 'public_bookcase' %}📚{% endif %}", - "body": "{% if tags.operator %}{{ keyTrans('operator') }}: {{ tags.operator }}
{% endif %}", "description": "{{ tagTrans('amenity', tags.amenity) }}", + "body": "{% if tags.operator %}{{ keyTrans('operator') }}: {{ tags.operator }}
{% endif %}", + "markerSign": "{% if tags.amenity == 'university' or tags.amenity == 'college' %}🎓{% elseif tags.amenity == 'library' %}🕮{% elseif tags.amenity == 'school' or tags.amenity == 'language_school' %}🏫{% elseif tags.amenity == 'kindergarten' %}⛹{% elseif tags.amenity == 'public_bookcase' %}📚{% endif %}", "priority": "{% if tags.amenity == 'university' %}0{% elseif tags.amenity == 'college' %}1{% elseif tags.amenity == 'library' %}2{% elseif tags.amenity == 'school' or tags.amenity == 'language_school' %}3{% elseif tags.amenity == 'kindergarten' %}4{% elseif tags.amenity == 'public_bookcase' %}5{% endif %}" } } diff --git a/gastro.json b/gastro.json index e31e3a26..44504c59 100644 --- a/gastro.json +++ b/gastro.json @@ -20,7 +20,7 @@ "16": "(node[amenity~'^(bar|biergarten|cafe|fast_food|ice_cream|pub|restaurant)$'];way[amenity~'^(bar|biergarten|cafe|fast_food|ice_cream|pub|restaurant)$'];relation[amenity~'^(bar|biergarten|cafe|fast_food|ice_cream|pub|restaurant)$'];);" }, "feature": { - "markerSign": "{% if tags.amenity=='bar' %}🍸{% elseif tags.amenity=='biergarten'%}🍻{% elseif tags.amenity=='cafe' %}☕{% elseif tags.amenity=='fast_food' %}🍔{% elseif tags.amenity=='ice_cream' %}🍨{% elseif tags.amenity=='pub' %}🍺{% else %}🍴{% endif %}", + "description": "{{ tagTrans('amenity', tags.amenity) }}", "body": [ "" ], - "description": "{{ tagTrans('amenity', tags.amenity) }}" + "markerSign": "{% if tags.amenity=='bar' %}🍸{% elseif tags.amenity=='biergarten'%}🍻{% elseif tags.amenity=='cafe' %}☕{% elseif tags.amenity=='fast_food' %}🍔{% elseif tags.amenity=='ice_cream' %}🍨{% elseif tags.amenity=='pub' %}🍺{% else %}🍴{% endif %}" } } diff --git a/index.json b/index.json index c73a53e1..96252938 100644 --- a/index.json +++ b/index.json @@ -2,6 +2,8 @@ "type": "index", "subCategories": [ { + "id": "leisure_sport_shopping", + "type": "index", "name": { "ast": "Recréu, deportes y compres", "ca": "Oci, esport i compres", @@ -21,8 +23,6 @@ "ru": "Досуг", "uk": "Дозвілля" }, - "id": "leisure_sport_shopping", - "type": "index", "subCategories": [ { "id": "gastro" @@ -42,6 +42,8 @@ ] }, { + "id": "services", + "type": "index", "name": { "ast": "Servicios", "ca": "Serveis", @@ -61,8 +63,6 @@ "ru": "Услуги", "uk": "Послуги" }, - "id": "services", - "type": "index", "subCategories": [ { "id": "emergency" @@ -91,6 +91,8 @@ "id": "culture_religion" }, { + "id": "transport", + "type": "index", "name": { "ast": "Tresporte", "cs": "Doprava", @@ -106,19 +108,16 @@ "pl": "Transport", "ro": "Transport", "ru": "Транспорт", - "tr": "Toplu Taşıma", "uk": "Транспорт" }, - "id": "transport", - "type": "index", "subCategories": [ { + "id": "transport_walk", + "type": "index", "name": { "de": "Zu Fuß gehen", "en": "Walking" }, - "id": "transport_walk", - "type": "index", "subCategories": [ { "id": "walk_amenities" @@ -129,12 +128,12 @@ ] }, { + "id": "transport_cycle", + "type": "index", "name": { "de": "Radfahren", "en": "Cycling" }, - "id": "transport_cycle", - "type": "index", "subCategories": [ { "id": "cycle_amenities" @@ -145,6 +144,8 @@ ] }, { + "id": "transport_pt", + "type": "index", "name": { "ast": "Tresporte Públicu", "cs": "Veřejná doprava", @@ -162,8 +163,6 @@ "ru": "Общественный транспорт", "uk": "Громадський транспорт" }, - "id": "transport_pt", - "type": "index", "subCategories": [ { "id": "pt_amenities" @@ -177,6 +176,8 @@ ] }, { + "id": "transport_car", + "type": "index", "name": { "ast": "Tráficu individual", "cs": "Individuální doprava", @@ -191,8 +192,6 @@ "ru": "Частный транспорт", "uk": "Приватний транспорт" }, - "id": "transport_car", - "type": "index", "subCategories": [ { "id": "car_amenities" @@ -205,12 +204,12 @@ ] }, { + "id": "infrastructure", + "type": "index", "name": { "de": "Infrastruktur", "en": "Infrastructure" }, - "id": "infrastructure", - "type": "index", "subCategories": [ { "id": "agriculture" @@ -267,12 +266,12 @@ "id": "places_geo" }, { + "id": "special", + "type": "index", "name": { "en": "Special", "de": "Spezial" }, - "id": "special", - "type": "index", "subCategories": [ { "id": "wikipedia" diff --git a/places.json b/places.json index bdf0a5d9..8d742485 100644 --- a/places.json +++ b/places.json @@ -29,10 +29,8 @@ }, "feature": { "title": "{% set loc_name = localizedTag(tags, 'name') %}{{ loc_name }}{% if loc_name != tags.name %} ({{ tags.name }}){% endif %}", - "body": [ - "{% if tags.population %}{{ keyTrans('population') }}: {{ tags.population }}{% endif %} " - ], "description": "{{ tagTrans('place', tags.place) }}", + "body": "{% if tags.population %}{{ keyTrans('population') }}: {{ tags.population }}{% endif %} ", "priority": "{% set priorities = { 'continent': 0, 'country': 1, 'state': 2, 'region': 3, 'city': 4, 'town': 5, 'village': 6, 'suburb': 7, 'hamlet': 8, 'quarter': 9, neighbourhood: 10, 'isolated_dwelling': 11, 'farm': 12 } %}{{ priorities[tags.place] }}" } } diff --git a/places_geo.json b/places_geo.json index 3eb7f7c6..469ccac2 100644 --- a/places_geo.json +++ b/places_geo.json @@ -1,4 +1,5 @@ { + "type": "index", "name": { "ast": "Llugares", "cs": "Sídla", @@ -16,7 +17,6 @@ "ru": "Места", "uk": "Місцевість" }, - "type": "index", "subCategories": [ { "id": "places" diff --git a/power.json b/power.json index f0e353e3..baa3ffb7 100644 --- a/power.json +++ b/power.json @@ -21,14 +21,14 @@ "16": "(node[power];way[power];relation[power];)" }, "feature": { - "markerSign": null, + "description": "{{ tagTrans('power', tags.power) }}{% set x='generator:source' %}{% if tags[x] %}, {{ tagTransList('generator:source', tags[x]) }}{% endif %}", + "popupDescription": "{{ tagTrans('power', tags.power) }}", "body": [ "{% set x='generator:source' %}{% if tags[x] %}
{{ keyTrans('generator:source') }}: {{ tagTransList('generator:source', tags[x]) }}{% endif %}", "{% set x='generator:method' %}{% if tags[x] %}
{{ keyTrans('generator:method') }}: {{ tagTransList('generator:method', tags[x]) }}{% endif %}", "{% set x='generator:type' %}{% if tags[x] %}
{{ tagTransList('generator:type') }}: {{ tagTrans('generator:type', tags[x]) }}{% endif %}" ], - "description": "{{ tagTrans('power', tags.power) }}{% set x='generator:source' %}{% if tags[x] %}, {{ tagTransList('generator:source', tags[x]) }}{% endif %}", - "priority": "{% if tags.power == 'plant' %}0{% elseif tags.power == 'generator' or tags.power == 'line' %}1{% elseif tags.power == 'substation' %}2{% else %}3{% endif %}", - "popupDescription": "{{ tagTrans('power', tags.power) }}" + "markerSign": null, + "priority": "{% if tags.power == 'plant' %}0{% elseif tags.power == 'generator' or tags.power == 'line' %}1{% elseif tags.power == 'substation' %}2{% else %}3{% endif %}" } } diff --git a/pt_routes.json b/pt_routes.json index d2968786..57be6f5c 100644 --- a/pt_routes.json +++ b/pt_routes.json @@ -8,11 +8,11 @@ "13": "relation[type=route][route~\"^(bus|trolleybus|ferry|train|tram)$\"];" }, "feature": { - "description": "{{ tagTrans('route', tags.route) }}", "title": [ "{% if tags.ref %}{{ tags.ref }} - {% endif %}", "", "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) | default(trans('unnamed')) }}" - ] + ], + "description": "{{ tagTrans('route', tags.route) }}" } } diff --git a/public.json b/public.json index 66d9bdbb..c7b7ad26 100644 --- a/public.json +++ b/public.json @@ -21,8 +21,8 @@ }, "feature": { "title": "{{ tags.name|default(tags.operator)|default(tagTrans('amenity', tags.amenity)) }}", - "markerSign": "{% if tags.amenity=='post_office' %}🏤{% elseif tags.amenity=='post_box'%}📮{% elseif tags.amenity=='internet_cafe' %}💻{% elseif tags.amenity=='telephone' %}✆{% endif %}", + "description": "{{ tagTrans('amenity', tags.amenity) }}", "body": "{% if tags.operator %}{{ keyTrans('operator') }}: {{ tags.operator }}
{% endif %}", - "description": "{{ tagTrans('amenity', tags.amenity) }}" + "markerSign": "{% if tags.amenity=='post_office' %}🏤{% elseif tags.amenity=='post_box'%}📮{% elseif tags.amenity=='internet_cafe' %}💻{% elseif tags.amenity=='telephone' %}✆{% endif %}" } } diff --git a/railway-electrification.json b/railway-electrification.json index 7bce5c76..e603708f 100644 --- a/railway-electrification.json +++ b/railway-electrification.json @@ -34,21 +34,44 @@ " {% 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) }} -", + "", + "{% if tags.electrified == 'no' %}", + " {{ trans('not electrified') }}", + "{% elseif tags.electrified %}", + " {{ tags.voltage|default(trans('unknown')) }}V, {{ tags.frequency|default(trans('unknown')) }}Hz", + "{% endif %}" + ], + "body": [ + "{{ tagTrans('railway', tags.railway) }}
", + "{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}
{% endif %}", + "{% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}
{% endif %}", + "{% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}
{% endif %}", + "{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}
", + "{% if tags.electrified == 'no' %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', 'no') }}{% elseif tags.electrified %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', tags.electrified) }}, {{ keyTrans('voltage') }}: {{ tags.voltage|default(trans('unknown')) }}, {{ keyTrans('frequency') }}: {{ tags.frequency|default(trans('unknown')) }}
{% endif %}" + ], + "markerSign": null, + "priority": "{% if tags.railway == 'station' %}0{% elseif tags.railway in [ 'halt', 'tram_stop' ] %}1{% else %}5{% endif %}", + "styles": "{% if tags.railway == 'narrow_gauge' %}default,casing,highlight{% else %}default,highlight{% endif %}", + "style": { + "weight": "{{ weight }}", + "color": "white", + "opacity": "1", + "fill": null + }, "style:casing": { "weight": "{{ weight + 2 }}", "color": "{{ color }}", - "dashArray": "2,4", - "lineCap": "butt" - }, - "style": { - "color": "white", - "weight": "{{ weight }}", - "fill": null, - "opacity": "1" + "lineCap": "butt", + "dashArray": "2,4" }, "style:highlight": { - "color": "{{ color }}", "weight": "{{ weight }}", + "color": "{{ color }}", + "opacity": "1", + "lineCap": "butt", "dashArray": [ "{% if not tags.electrified or tags.electrified == 'no' %}", "{% elseif tags.frequency == 0 %}", @@ -56,31 +79,8 @@ "5,2", "{% endif %}" ], - "fillColor": "{% if tags.railway == 'platform' %}#3f3f3f{% endif %}", "fill": "{% if tags.railway == 'platform' %}1{% else %}{% endif %}", - "opacity": "1", - "lineCap": "butt" - }, - "styles": "{% if tags.railway == 'narrow_gauge' %}default,casing,highlight{% else %}default,highlight{% endif %}", - "markerSign": null, - "body": [ - "{{ tagTrans('railway', tags.railway) }}
", - "{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}
{% endif %}", - "{% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}
{% endif %}", - "{% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}
{% endif %}", - "{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}
", - "{% if tags.electrified == 'no' %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', 'no') }}{% elseif tags.electrified %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', tags.electrified) }}, {{ keyTrans('voltage') }}: {{ tags.voltage|default(trans('unknown')) }}, {{ keyTrans('frequency') }}: {{ tags.frequency|default(trans('unknown')) }}
{% endif %}" - ], - "description": [ - "{{ tagTrans('railway', tags.railway) }} -", - "", - "{% if tags.electrified == 'no' %}", - " {{ trans('not electrified') }}", - "{% elseif tags.electrified %}", - " {{ tags.voltage|default(trans('unknown')) }}V, {{ tags.frequency|default(trans('unknown')) }}Hz", - "{% endif %}" - ], - "priority": "{% if tags.railway == 'station' %}0{% elseif tags.railway in [ 'halt', 'tram_stop' ] %}1{% else %}5{% endif %}", - "title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator'))|default(trans('unnamed')) }}" + "fillColor": "{% if tags.railway == 'platform' %}#3f3f3f{% endif %}" + } } } diff --git a/railway-infrastructure.json b/railway-infrastructure.json index 8cf266bc..e1233358 100644 --- a/railway-infrastructure.json +++ b/railway-infrastructure.json @@ -10,23 +10,23 @@ "17": "(node[railway];way[railway];)" }, "feature": { - "style:casing": { - "weight": "{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}5{% else %}{% if tags.railway == 'rail' %}{% if tags.usage == 'main' or tags.usage == 'branch' %}7{% else %}6{% endif %}{% elseif tags.railway == 'platform' %}5{% else %}6{% endif %}{% endif %}", - "color": "{% if tags.railway == 'rail' or tags.railway == 'narrow_gauge' or tags.railway == 'disused' %}{% if tags.usage == 'main' %}#ff8100{% elseif tags.usage == 'branch' %}#daca00{% else %}#000000{% endif %}{% elseif tags.railway == 'subway' %}#0000ff{% elseif tags.railway == 'tram' %}#ff00ff{% elseif tags.railway == 'light_rail' %}#00BD14{% elseif tags.railway == 'platform' %}#3f3f3f{% else %}#000000{% endif %}", - "dashArray": "2,4", - "lineCap": "butt" - }, + "title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator'))|default(trans('unnamed')) }}", + "description": "{{ tagTrans('railway', tags.railway) }}", + "body": [ + "{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}
{% endif %}", + "{% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}
{% endif %}", + "{% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}
{% endif %}", + "{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}
", + "{% if tags.electrified == 'no' %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', 'no') }}{% elseif tags.electrified %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', tags.electrified) }}, {{ keyTrans('voltage') }}: {{ tags.voltage|default(trans('unknown')) }}, {{ keyTrans('frequency') }}: {{ tags.frequency|default(trans('unknown')) }}
{% endif %}" + ], + "markerSign": null, + "priority": "{% if tags.railway == 'station' %}0{% elseif tags.railway in [ 'halt', 'tram_stop' ] %}1{% else %}5{% endif %}", + "styles": "{% if tags.railway == 'narrow_gauge' %}default,casing{% else %}default{% endif %}", "style": { - "color": "{% if tags.railway == 'rail' or tags.railway == 'narrow_gauge' or tags.railway == 'disused' %}{% if tags.usage == 'main' %}#ff8100{% elseif tags.usage == 'branch' %}#daca00{% else %}#000000{% endif %}{% elseif tags.railway == 'subway' %}#0000ff{% elseif tags.railway == 'tram' %}#ff00ff{% elseif tags.railway == 'light_rail' %}#00BD14{% elseif tags.railway == 'platform' %}#3f3f3f{% else %}#000000{% endif %}", "weight": "{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}1{% else %}{% if tags.railway == 'rail' %}{% if tags.usage == 'main' or tags.usage == 'branch' %}3{% else %}2{% endif %}{% elseif tags.railway == 'platform' %}1{% else %}2{% endif %}{% endif %}", + "color": "{% if tags.railway == 'rail' or tags.railway == 'narrow_gauge' or tags.railway == 'disused' %}{% if tags.usage == 'main' %}#ff8100{% elseif tags.usage == 'branch' %}#daca00{% else %}#000000{% endif %}{% elseif tags.railway == 'subway' %}#0000ff{% elseif tags.railway == 'tram' %}#ff00ff{% elseif tags.railway == 'light_rail' %}#00BD14{% elseif tags.railway == 'platform' %}#3f3f3f{% else %}#000000{% endif %}", + "opacity": "1", "dashArray": "{% if tags.railway == 'rail' %}{% elseif tags.railway == 'disused' %}1,5{% elseif tags.railway == 'abandoned' %}1,7{% endif %}", - "fillColor": [ - "{% if tags.railway == 'platform' %}", - "#3f3f3f", - "{% elseif type == 'node' %}", - "#ffffff", - "{% endif %}" - ], "fill": [ "{% if tags.railway == 'platform' %}", "1", @@ -35,7 +35,13 @@ "{% else %}", "{% endif %}" ], - "opacity": "1", + "fillColor": [ + "{% if tags.railway == 'platform' %}", + "#3f3f3f", + "{% elseif type == 'node' %}", + "#ffffff", + "{% endif %}" + ], "fillOpacity": [ "{% if tags.railway == 'platform' %}", "0.2", @@ -44,17 +50,11 @@ "{% endif %}" ] }, - "styles": "{% if tags.railway == 'narrow_gauge' %}default,casing{% else %}default{% endif %}", - "markerSign": null, - "body": [ - "{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}
{% endif %}", - "{% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}
{% endif %}", - "{% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}
{% endif %}", - "{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}
", - "{% if tags.electrified == 'no' %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', 'no') }}{% elseif tags.electrified %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', tags.electrified) }}, {{ keyTrans('voltage') }}: {{ tags.voltage|default(trans('unknown')) }}, {{ keyTrans('frequency') }}: {{ tags.frequency|default(trans('unknown')) }}
{% endif %}" - ], - "description": "{{ tagTrans('railway', tags.railway) }}", - "priority": "{% if tags.railway == 'station' %}0{% elseif tags.railway in [ 'halt', 'tram_stop' ] %}1{% else %}5{% endif %}", - "title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator'))|default(trans('unnamed')) }}" + "style:casing": { + "weight": "{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}5{% else %}{% if tags.railway == 'rail' %}{% if tags.usage == 'main' or tags.usage == 'branch' %}7{% else %}6{% endif %}{% elseif tags.railway == 'platform' %}5{% else %}6{% endif %}{% endif %}", + "color": "{% if tags.railway == 'rail' or tags.railway == 'narrow_gauge' or tags.railway == 'disused' %}{% if tags.usage == 'main' %}#ff8100{% elseif tags.usage == 'branch' %}#daca00{% else %}#000000{% endif %}{% elseif tags.railway == 'subway' %}#0000ff{% elseif tags.railway == 'tram' %}#ff00ff{% elseif tags.railway == 'light_rail' %}#00BD14{% elseif tags.railway == 'platform' %}#3f3f3f{% else %}#000000{% endif %}", + "lineCap": "butt", + "dashArray": "2,4" + } } } diff --git a/religion.json b/religion.json index c002e8c1..dd27a2ff 100644 --- a/religion.json +++ b/religion.json @@ -38,6 +38,7 @@ "{% endif %}" ], "description": "{{ tagTrans(key, value) }}{% if tags.religion %}: {{ tagTransList('religion', tags.religion) }}{% endif %}", + "popupDescription": "{{ tagTrans(key, value) }}", "body": [ "{% if tags.religion %}", " {{ keyTrans('religion') }}: {{ tagTransList('religion', tags.religion) }}", @@ -55,7 +56,6 @@ "{% elseif tags.religion == 'jewish' %}✡", "{% elseif tags.religion == 'pagan' %}☆", "{% endif %}" - ], - "popupDescription": "{{ tagTrans(key, value) }}" + ] } } diff --git a/sport.json b/sport.json index db1dc051..008c933d 100644 --- a/sport.json +++ b/sport.json @@ -18,12 +18,12 @@ "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) }}", "markerSign": [ "{% set firstSport = tags.sport|split(';')[0] %}", "{{ const[firstSport] }}" - ], - "title": "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) |default(tagTransList('sport', tags.sport)) }}" + ] }, "const": { "9pin": "🎳", diff --git a/walk_amenities.json b/walk_amenities.json index a099acd6..2ce5e877 100644 --- a/walk_amenities.json +++ b/walk_amenities.json @@ -49,8 +49,8 @@ "", "{% set type_data = const[value] %}" ], - "description": "{{ tagTrans(key, value) }}", "title": "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) | default(tagTrans(key, value)) }}", + "description": "{{ tagTrans(key, value) }}", "markerSign": "{{ type_data.sign|raw }}", "priority": "{{ type_data.priority }}" }, diff --git a/works.json b/works.json index 42c47fd6..d406a053 100644 --- a/works.json +++ b/works.json @@ -1,4 +1,5 @@ { + "type": "overpass", "name": { "ast": "Fábriques", "cs": "Továrny", @@ -10,12 +11,10 @@ "nl": "Fabrieken", "ru": "Промышленность" }, - "type": "overpass", "query": { "12": "(node[landuse~'^(industrial)$'];way[landuse~'^(industrial)$'];relation[landuse~'^(industrial)$'];)" }, - "minZoom": 12, "feature": { - "markerSign": "" + "markerSign": null } }