Browse Source

railway-infrastructure: improve signals, switches, railway_crossing

master
parent
commit
6c831b4c26
  1. 24
      railway-infrastructure.json

24
railway-infrastructure.json

@ -23,15 +23,29 @@
"markerSign": "{% if tags.railway in [ 'halt', 'tram_stop', 'station', 'stop', 'subway_entrance' ] %}X{% endif %}", "markerSign": "{% if tags.railway in [ 'halt', 'tram_stop', 'station', 'stop', 'subway_entrance' ] %}X{% endif %}",
"markerSymbol": [ "markerSymbol": [
"{% if tags.railway == 'signal' %}", "{% 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 anchorX='5' anchorY='8' width='9' height='15'>",
" <rect x='0.5' y='0.5' width='8' height='14' style='fill: #000000; fill-opacity: 1;' />",
" <circle cx='4.5' cy='4.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #7f7f7f;'/>",
" <circle cx='4.5' cy='10.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #ff0000;'/>",
"</svg>", "</svg>",
"{% else %}",
"{% elseif tags.railway == 'switch' %}",
"<svg anchorX='5' anchorY='8' width='9' height='15'>",
" <rect x='0.5' y='0.5' width='8' height='14' style='fill: #ffffff; fill-opacity: 1;' />",
" <line x1='2' x2='2' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>",
" <line x1='2' x2='7' y1='10' y2='2' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>",
"</svg>",
"{% elseif tags.railway == 'railway_crossing' %}",
"<svg anchorX='5' anchorY='8' width='9' height='15'>",
" <rect x='0.5' y='0.5' width='8' height='14' style='fill: #ffffff; fill-opacity: 1;' />",
" <line x1='2' x2='7' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>",
" <line x1='7' x2='2' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>",
"</svg>",
"{% elseif tags.railway not in [ 'rail', 'tram', 'subway', 'narrow_gauge', 'abandoned', 'disused' ] %}",
"{{ markerPointer({})|raw }}", "{{ markerPointer({})|raw }}",
"{% endif %}" "{% endif %}"
], ],
"listMarkerSymbol": [ "listMarkerSymbol": [
"{% if tags.railway in [ 'station', 'halt', 'tram_stop', 'stop', 'subway_entrance', 'signal' ] %}",
"{% if tags.railway in [ 'station', 'halt', 'tram_stop', 'stop', 'subway_entrance', 'signal', 'switch', 'railway_crossing' ] %}",
"{% else %}", "{% else %}",
"line", "line",
"{% endif %}" "{% endif %}"
@ -58,6 +72,8 @@
" {% endif %}", " {% endif %}",
" {% elseif tags.railway == 'platform' %}", " {% elseif tags.railway == 'platform' %}",
" 1", " 1",
" {% elseif tags.railway in [ 'signal', 'switch', 'railway_crossing' ] %}",
" 0",
" {% else %}", " {% else %}",
" 2", " 2",
" {% endif %}", " {% endif %}",

Loading…
Cancel
Save