Browse Source

Merge branch 'info'

fossil
parent
commit
7de1bcb91d
  1. 34
      culture.json
  2. 2
      places.json
  3. 72
      railway-electrification.json
  4. 61
      railway-infrastructure.json
  5. 26
      water.json

34
culture.json

@ -42,18 +42,28 @@
"{% endif %}" "{% endif %}"
], ],
"description": "{{ tagTrans(key, value) }}", "description": "{{ tagTrans(key, value) }}",
"markerSign": "{{ const[value] }}"
"markerSign": "{{ attribute(const, key ~ '=' ~ value) }}"
}, },
"const": { "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": [
"<table>",
"{% for value, sign in const %}",
" <tr>",
" <td>{{ markerCircle({})|raw }}<div class='sign'>{{ sign }}</div></td>",
" <td>{{ tagTrans(value|split('=')[0], value|split('=')[1]) }}</td>",
" </tr>",
"{% endfor %}",
"</table>"
]
} }

2
places.json

@ -30,7 +30,7 @@
"feature": { "feature": {
"title": "{% set loc_name = localizedTag(tags, 'name') %}{{ loc_name }}{% if loc_name != tags.name %} ({{ tags.name }}){% endif %}", "title": "{% set loc_name = localizedTag(tags, 'name') %}{{ loc_name }}{% if loc_name != tags.name %} ({{ tags.name }}){% endif %}",
"description": "{{ tagTrans('place', tags.place) }}", "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] }}" "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] }}"
} }
} }

72
railway-electrification.json

@ -5,16 +5,16 @@
"en": "Railway electrification" "en": "Railway electrification"
}, },
"query": { "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": { "feature": {
"pre": [ "pre": [
"{% if tags.electrified and tags.electrified != 'no' %}", "{% 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 %}", " {% else %}",
" {% set color = colorInterpolate([ 'red', 'blue' ], (tags.voltage - 1000) / 24000) %}",
" {% set color = colorInterpolate([ 'blue', 'red' ], (tags.voltage - 1000) / 24000) %}",
" {% endif %}", " {% endif %}",
"{% else %}", "{% else %}",
" {% set color='black' %}", " {% 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')) }}<br/>{% 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')) }}<br/>{% endif %}"
], ],
"markerSign": null, "markerSign": null,
"listMarkerSymbol": "line",
"styles": "casing,default",
"priority": "{% if tags.railway == 'station' %}0{% elseif tags.railway in [ 'halt', 'tram_stop' ] %}1{% else %}5{% endif %}", "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": { "style": {
"weight": "{{ weight }}", "weight": "{{ weight }}",
"color": "white",
"opacity": "1",
"fill": null
},
"style:casing": {
"weight": "{{ weight + 2 }}",
"color": "{{ color }}",
"lineCap": "butt", "lineCap": "butt",
"dashArray": "2,4"
},
"style:highlight": {
"weight": "{{ weight }}",
"color": "{{ color }}", "color": "{{ color }}",
"opacity": "1", "opacity": "1",
"lineCap": "butt",
"fill": null,
"dashArray": [ "dashArray": [
"{% if not tags.electrified or tags.electrified == 'no' %}", "{% if not tags.electrified or tags.electrified == 'no' %}",
"{% elseif tags.frequency == 0 %}", "{% elseif tags.frequency == 0 %}",
"{% else %}", "{% else %}",
"5,2", "5,2",
"{% endif %}" "{% 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": [
"<table>",
" {% set color = '#000000' %}",
" <tr>",
" <td>{{ markerLine({ 'weight': 3, 'color': color })|raw }}</td>",
" <td>{{ trans('not electrified') }}</td>",
" </tr>",
"{% for i in range(0, 1000, 200) %}",
" {% set color = colorInterpolate([ '#00ff00', 'blue' ], i / 1000) %}",
" <tr>",
" <td>{{ markerLine({ 'weight': 3, 'color': color })|raw }}</td>",
" <td>{{ i }}V</td>",
" </tr>",
"{% endfor %}",
"",
"{% for i in range(3000, 25000, 2000) %}",
" {% set color = colorInterpolate([ 'blue', 'red' ], (i - 1000) / 24000) %}",
" <tr>",
" <td>{{ markerLine({ 'weight': 3, 'color': color })|raw }}</td>",
" <td>{{ i }}V</td>",
" </tr>",
"{% endfor %}",
"",
" <tr>",
" <td>{{ markerLine({ 'weight': 3, 'color': color })|raw }}</td>",
" <td>{{ trans('direct current') }}</td>",
" </tr>",
"",
" <tr>",
" <td>{{ markerLine({ 'styles': [ 'casing', 'default' ], 'style:casing': { 'weight': 3, 'color': 'white' }, 'style': { 'weight': '3', 'dashArray': '5,2', 'lineCap': 'butt', 'color': color } })|raw }}</td>",
" <td>{{ trans('alternating current') }}</td>",
" </tr>",
"</table>"
]
} }

61
railway-infrastructure.json

@ -17,10 +17,33 @@
"{% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %}", "{% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %}",
"{% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}<br/>{% endif %}", "{% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}<br/>{% endif %}",
"{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}<br/>", "{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}<br/>",
"{% 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')) }}<br/>{% 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')) }}<br/>{% endif %}",
""
],
"markerSign": "{% if tags.railway in [ 'halt', 'tram_stop', 'station', 'stop', 'subway_entrance' ] %}X{% endif %}",
"markerSymbol": [
"{% if tags.railway == 'signal' %}",
"<svg width='10' height='10'>",
" <circle cx='4.5' cy='4.5' r='3' style='stroke-width: 3; stroke: #000000; fill: #ffffff'>",
"</svg>",
"{% 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 %}", "styles": "{% if tags.railway == 'narrow_gauge' %}default,casing{% else %}default{% endif %}",
"style": { "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 %}", "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", "lineCap": "butt",
"dashArray": "2,4" "dashArray": "2,4"
} }
}
},
"info": [
"<table>",
" <tr>",
" <td>{{ markerLine(evaluate({ \"railway\": \"rail\", \"usage\": \"main\" }))|raw }}</td>",
" <td>{{ tagTrans('railway', 'rail') }}, {{ keyTrans('usage') }}: {{ tagTrans('usage', 'main') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine(evaluate({ \"railway\": \"rail\" }))|raw }}</td>",
" <td>{{ tagTrans('railway', 'rail') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine(evaluate({ \"railway\": \"narrow_gauge\" }))|raw }}</td>",
" <td>{{ tagTrans('railway', 'narrow_gauge') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine(evaluate({ \"railway\": \"light_rail\" }))|raw }}</td>",
" <td>{{ tagTrans('railway', 'light_rail') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine(evaluate({ \"railway\": \"subway\" }))|raw }}</td>",
" <td>{{ tagTrans('railway', 'subway') }}</td>",
" </tr>",
"{% if map.zoom >= 14 %}",
" <tr>",
" <td>{{ markerLine(evaluate({ \"railway\": \"tram\" }))|raw }}</td>",
" <td>{{ tagTrans('railway', 'tram') }}</td>",
" </tr>",
"{% endif %}",
"</table>"
]
} }

26
water.json

@ -39,5 +39,29 @@
"{% endif %}" "{% endif %}"
] ]
} }
}
},
"info": [
"<table>",
" <tr>",
" <td>{{ markerPolygon(evaluate({ \"natural\": \"water\" }))|raw }}</td>",
" <td>{{ tagTrans('natural', 'water') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine(evaluate({ \"waterway\": \"river\" }))|raw }}</td>",
" <td>{{ tagTrans('waterway', 'river') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine(evaluate({ \"waterway\": \"stream\" }))|raw }}</td>",
" <td>{{ tagTrans('waterway', 'stream') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine(evaluate({ \"waterway\": \"dam\" }))|raw }}</td>",
" <td>{{ tagTrans('waterway', 'dam') }}, {{ tagTrans('waterway', 'weir') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine(evaluate({ \"natural\": \"divide\" }))|raw }}</td>",
" <td>{{ tagTrans('natural', 'divide') }}</td>",
" </tr>",
"</table>"
]
} }
Loading…
Cancel
Save