diff --git a/culture.json b/culture.json
index 62bc7e442..d44f689d9 100644
--- a/culture.json
+++ b/culture.json
@@ -42,18 +42,28 @@
"{% endif %}"
],
"description": "{{ tagTrans(key, value) }}",
- "markerSign": "{{ const[value] }}"
+ "markerSign": "{{ attribute(const, key ~ '=' ~ value) }}"
},
"const": {
- "arts_centre": "🎨",
- "cinema": "🎦",
- "community_centre": "",
- "fountain": "⛲",
- "studio": "",
- "theatre": "🎭",
- "artwork": "🎨 ",
- "gallery": "🖼",
- "museum": "🏛 ",
- "theme_park": ""
- }
+ "amenity=arts_centre": "🎨",
+ "amenity=cinema": "🎦",
+ "amenity=community_centre": "",
+ "amenity=fountain": "⛲",
+ "amenity=studio": "",
+ "amenity=theatre": "🎭",
+ "tourism=artwork": "🎨 ",
+ "tourism=gallery": "🖼",
+ "tourism=museum": "🏛 ",
+ "tourism=theme_park": ""
+ },
+ "info": [
+ "
",
+ "{% for value, sign in const %}",
+ " ",
+ " {{ markerCircle({})|raw }} {{ sign }} | ",
+ " {{ tagTrans(value|split('=')[0], value|split('=')[1]) }} | ",
+ "
",
+ "{% endfor %}",
+ "
"
+ ]
}
diff --git a/places.json b/places.json
index 8d742485d..aceabb480 100644
--- a/places.json
+++ b/places.json
@@ -30,7 +30,7 @@
"feature": {
"title": "{% set loc_name = localizedTag(tags, 'name') %}{{ loc_name }}{% if loc_name != tags.name %} ({{ tags.name }}){% endif %}",
"description": "{{ tagTrans('place', tags.place) }}",
- "body": "{% if tags.population %}{{ keyTrans('population') }}: {{ tags.population }}{% endif %} ",
+ "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/railway-electrification.json b/railway-electrification.json
index e603708fd..9c27746fe 100644
--- a/railway-electrification.json
+++ b/railway-electrification.json
@@ -5,16 +5,16 @@
"en": "Railway electrification"
},
"query": {
- "11": "way[railway=rail][railway!~'^(platform|abandoned|disused|station|proposed)$'][usage~'^(main|branch)$'];",
- "14": "way[railway][railway!~'^(platform|abandoned|disused|station|proposed)$'];"
+ "11": "way[railway=rail][railway!~'^(platform|abandoned|disused|station|proposed|subway_entrance)$'][usage~'^(main|branch)$'];",
+ "14": "way[railway][railway!~'^(platform|abandoned|disused|station|proposed|subway_entrance)$'];"
},
"feature": {
"pre": [
"{% if tags.electrified and tags.electrified != 'no' %}",
- " {% if tags.voltage < 5000 %}",
- " {% set color = colorInterpolate([ 'green', 'red' ], tags.voltage / 1000) %}",
+ " {% if tags.voltage < 1000 %}",
+ " {% set color = colorInterpolate([ '#00ff00', 'blue' ], tags.voltage / 1000) %}",
" {% else %}",
- " {% set color = colorInterpolate([ 'red', 'blue' ], (tags.voltage - 1000) / 24000) %}",
+ " {% set color = colorInterpolate([ 'blue', 'red' ], (tags.voltage - 1000) / 24000) %}",
" {% endif %}",
"{% else %}",
" {% set color='black' %}",
@@ -53,34 +53,62 @@
"{% 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,
+ "listMarkerSymbol": "line",
+ "styles": "casing,default",
"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 }}",
"lineCap": "butt",
- "dashArray": "2,4"
- },
- "style:highlight": {
- "weight": "{{ weight }}",
"color": "{{ color }}",
"opacity": "1",
- "lineCap": "butt",
+ "fill": null,
"dashArray": [
"{% if not tags.electrified or tags.electrified == 'no' %}",
"{% elseif tags.frequency == 0 %}",
"{% else %}",
"5,2",
"{% endif %}"
- ],
- "fill": "{% if tags.railway == 'platform' %}1{% else %}{% endif %}",
- "fillColor": "{% if tags.railway == 'platform' %}#3f3f3f{% endif %}"
+ ]
+ },
+ "style:casing": {
+ "weight": "{{ weight }}",
+ "color": "white",
+ "opacity": "1",
+ "fill": null
}
- }
+ },
+ "info": [
+ "",
+ " {% set color = '#000000' %}",
+ " ",
+ " {{ markerLine({ 'weight': 3, 'color': color })|raw }} | ",
+ " {{ trans('not electrified') }} | ",
+ "
",
+ "{% for i in range(0, 1000, 200) %}",
+ " {% set color = colorInterpolate([ '#00ff00', 'blue' ], i / 1000) %}",
+ " ",
+ " {{ markerLine({ 'weight': 3, 'color': color })|raw }} | ",
+ " {{ i }}V | ",
+ "
",
+ "{% endfor %}",
+ "",
+ "{% for i in range(3000, 25000, 2000) %}",
+ " {% set color = colorInterpolate([ 'blue', 'red' ], (i - 1000) / 24000) %}",
+ " ",
+ " {{ markerLine({ 'weight': 3, 'color': color })|raw }} | ",
+ " {{ i }}V | ",
+ "
",
+ "{% endfor %}",
+ "",
+ " ",
+ " {{ markerLine({ 'weight': 3, 'color': color })|raw }} | ",
+ " {{ trans('direct current') }} | ",
+ "
",
+ "",
+ " ",
+ " {{ markerLine({ 'styles': [ 'casing', 'default' ], 'style:casing': { 'weight': 3, 'color': 'white' }, 'style': { 'weight': '3', 'dashArray': '5,2', 'lineCap': 'butt', 'color': color } })|raw }} | ",
+ " {{ trans('alternating current') }} | ",
+ "
",
+ "
"
+ ]
}
diff --git a/railway-infrastructure.json b/railway-infrastructure.json
index e1233358f..66df64cba 100644
--- a/railway-infrastructure.json
+++ b/railway-infrastructure.json
@@ -17,10 +17,33 @@
"{% 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 %}"
+ "{% 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": "{% if tags.railway in [ 'halt', 'tram_stop', 'station', 'stop', 'subway_entrance' ] %}X{% endif %}",
+ "markerSymbol": [
+ "{% if tags.railway == 'signal' %}",
+ "",
+ "{% else %}",
+ "{{ markerPointer({})|raw }}",
+ "{% endif %}"
+ ],
+ "listMarkerSymbol": [
+ "{% if tags.railway in [ 'station', 'halt', 'tram_stop', 'stop', 'subway_entrance', 'signal' ] %}",
+ "{% else %}",
+ "line",
+ "{% endif %}"
+ ],
+ "priority": [
+ "{% if tags.railway == 'station' %}0",
+ "{% elseif tags.railway in [ 'halt' ] %}1",
+ "{% elseif tags.railway in [ 'tram_stop', 'stop' ] %}2",
+ "{% elseif tags.railway in [ 'subway_entrance' ] %}3",
+ "{% else %}5",
+ "{% 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": {
"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 %}",
@@ -56,5 +79,35 @@
"lineCap": "butt",
"dashArray": "2,4"
}
- }
+ },
+ "info": [
+ "",
+ " ",
+ " {{ markerLine(evaluate({ \"railway\": \"rail\", \"usage\": \"main\" }))|raw }} | ",
+ " {{ tagTrans('railway', 'rail') }}, {{ keyTrans('usage') }}: {{ tagTrans('usage', 'main') }} | ",
+ "
",
+ " ",
+ " {{ markerLine(evaluate({ \"railway\": \"rail\" }))|raw }} | ",
+ " {{ tagTrans('railway', 'rail') }} | ",
+ "
",
+ " ",
+ " {{ markerLine(evaluate({ \"railway\": \"narrow_gauge\" }))|raw }} | ",
+ " {{ tagTrans('railway', 'narrow_gauge') }} | ",
+ "
",
+ " ",
+ " {{ markerLine(evaluate({ \"railway\": \"light_rail\" }))|raw }} | ",
+ " {{ tagTrans('railway', 'light_rail') }} | ",
+ "
",
+ " ",
+ " {{ markerLine(evaluate({ \"railway\": \"subway\" }))|raw }} | ",
+ " {{ tagTrans('railway', 'subway') }} | ",
+ "
",
+ "{% if map.zoom >= 14 %}",
+ " ",
+ " {{ markerLine(evaluate({ \"railway\": \"tram\" }))|raw }} | ",
+ " {{ tagTrans('railway', 'tram') }} | ",
+ "
",
+ "{% endif %}",
+ "
"
+ ]
}
diff --git a/water.json b/water.json
index e48041481..43b57faa0 100644
--- a/water.json
+++ b/water.json
@@ -39,5 +39,29 @@
"{% endif %}"
]
}
- }
+ },
+ "info": [
+ "",
+ " ",
+ " {{ markerPolygon(evaluate({ \"natural\": \"water\" }))|raw }} | ",
+ " {{ tagTrans('natural', 'water') }} | ",
+ "
",
+ " ",
+ " {{ markerLine(evaluate({ \"waterway\": \"river\" }))|raw }} | ",
+ " {{ tagTrans('waterway', 'river') }} | ",
+ "
",
+ " ",
+ " {{ markerLine(evaluate({ \"waterway\": \"stream\" }))|raw }} | ",
+ " {{ tagTrans('waterway', 'stream') }} | ",
+ "
",
+ " ",
+ " {{ markerLine(evaluate({ \"waterway\": \"dam\" }))|raw }} | ",
+ " {{ tagTrans('waterway', 'dam') }}, {{ tagTrans('waterway', 'weir') }} | ",
+ "
",
+ " ",
+ " {{ markerLine(evaluate({ \"natural\": \"divide\" }))|raw }} | ",
+ " {{ tagTrans('natural', 'divide') }} | ",
+ "
",
+ "
"
+ ]
}