Browse Source

Replace parameter 'weight' by 'width'

heritage
parent
commit
88a4290be7
  1. 2
      buildings.json
  2. 2
      car_maxspeed.json
  3. 2
      cycle_routes.json
  4. 22
      railway-electrification.json
  5. 4
      railway-infrastructure.json
  6. 2
      water.json

2
buildings.json

@ -28,7 +28,7 @@
"{{ p }}" "{{ p }}"
], ],
"style": { "style": {
"weight": "1",
"width": "1",
"color": "#000000", "color": "#000000",
"fillColor": "#000000" "fillColor": "#000000"
} }

2
car_maxspeed.json

@ -51,7 +51,7 @@
"markerSign": null, "markerSign": null,
"listMarkerSymbol": "line", "listMarkerSymbol": "line",
"style": { "style": {
"weight": "3",
"width": "3",
"color": "{{ color }}" "color": "{{ color }}"
} }
}, },

2
cycle_routes.json

@ -13,7 +13,7 @@
"feature": { "feature": {
"priority": "{% if tags.network=='icn' %}0{% elseif tags.network=='ncn' %}1{% elseif tags.network=='rcn' %}2{% else %}3{% endif %}", "priority": "{% if tags.network=='icn' %}0{% elseif tags.network=='ncn' %}1{% elseif tags.network=='rcn' %}2{% else %}3{% endif %}",
"style": { "style": {
"weight": 4,
"width": 4,
"color": "{% if tags.network=='icn' %}#ff0000{% elseif tags.network=='ncn' %}#ff007f{% elseif tags.network=='rcn' %}#7f00ff{% else %}#0000ff{% endif %}", "color": "{% if tags.network=='icn' %}#ff0000{% elseif tags.network=='ncn' %}#ff007f{% elseif tags.network=='rcn' %}#7f00ff{% else %}#0000ff{% endif %}",
"opacity": 1 "opacity": 1
} }

22
railway-electrification.json

@ -21,16 +21,16 @@
"{%endif %}", "{%endif %}",
"", "",
"{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}", "{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}",
" {% set weight=2 %}",
" {% set width=2 %}",
" {% else %}", " {% else %}",
" {% if tags.railway == 'rail' %}", " {% if tags.railway == 'rail' %}",
" {% if tags.usage == 'main' or tags.usage == 'branch' %}", " {% if tags.usage == 'main' or tags.usage == 'branch' %}",
" {% set weight=3 %}",
" {% set width=3 %}",
" {% else %}", " {% else %}",
" {% set weight=2.5 %}",
" {% set width=2.5 %}",
" {% endif %}", " {% endif %}",
" {% else %}", " {% else %}",
" {% set weight=2 %}",
" {% set width=2 %}",
" {% endif %}", " {% endif %}",
"{% endif %}" "{% endif %}"
], ],
@ -57,7 +57,7 @@
"styles": "casing,default", "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 %}",
"style": { "style": {
"weight": "{{ weight }}",
"width": "{{ width }}",
"lineCap": "butt", "lineCap": "butt",
"color": "{{ color }}", "color": "{{ color }}",
"opacity": "1", "opacity": "1",
@ -71,7 +71,7 @@
] ]
}, },
"style:casing": { "style:casing": {
"weight": "{{ weight }}",
"width": "{{ width }}",
"color": "white", "color": "white",
"opacity": "1", "opacity": "1",
"fill": null "fill": null
@ -81,13 +81,13 @@
"<table>", "<table>",
" {% set color = '#000000' %}", " {% set color = '#000000' %}",
" <tr>", " <tr>",
" <td>{{ markerLine({ 'weight': 3, 'color': color })|raw }}</td>",
" <td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td>",
" <td>{{ trans('not electrified') }}</td>", " <td>{{ trans('not electrified') }}</td>",
" </tr>", " </tr>",
"{% for i in range(0, 1000, 200) %}", "{% for i in range(0, 1000, 200) %}",
" {% set color = colorInterpolate([ '#00ff00', 'blue' ], i / 1000) %}", " {% set color = colorInterpolate([ '#00ff00', 'blue' ], i / 1000) %}",
" <tr>", " <tr>",
" <td>{{ markerLine({ 'weight': 3, 'color': color })|raw }}</td>",
" <td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td>",
" <td>{{ i }}V</td>", " <td>{{ i }}V</td>",
" </tr>", " </tr>",
"{% endfor %}", "{% endfor %}",
@ -95,18 +95,18 @@
"{% for i in range(3000, 25000, 2000) %}", "{% for i in range(3000, 25000, 2000) %}",
" {% set color = colorInterpolate([ 'blue', 'red' ], (i - 1000) / 24000) %}", " {% set color = colorInterpolate([ 'blue', 'red' ], (i - 1000) / 24000) %}",
" <tr>", " <tr>",
" <td>{{ markerLine({ 'weight': 3, 'color': color })|raw }}</td>",
" <td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td>",
" <td>{{ i }}V</td>", " <td>{{ i }}V</td>",
" </tr>", " </tr>",
"{% endfor %}", "{% endfor %}",
"", "",
" <tr>", " <tr>",
" <td>{{ markerLine({ 'weight': 3, 'color': color })|raw }}</td>",
" <td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td>",
" <td>{{ trans('direct current') }}</td>", " <td>{{ trans('direct current') }}</td>",
" </tr>", " </tr>",
"", "",
" <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>{{ markerLine({ 'styles': [ 'casing', 'default' ], 'style:casing': { 'width': 3, 'color': 'white' }, 'style': { 'width': '3', 'dashArray': '5,2', 'lineCap': 'butt', 'color': color } })|raw }}</td>",
" <td>{{ trans('alternating current') }}</td>", " <td>{{ trans('alternating current') }}</td>",
" </tr>", " </tr>",
"</table>" "</table>"

4
railway-infrastructure.json

@ -60,7 +60,7 @@
], ],
"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": [
"width": [
"{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}", "{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}",
"1", "1",
"{% else %}", "{% else %}",
@ -106,7 +106,7 @@
] ]
}, },
"style:casing": { "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 %}",
"width": "{% 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 %}", "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", "lineCap": "butt",
"dashArray": "2,4" "dashArray": "2,4"

2
water.json

@ -57,7 +57,7 @@
"{% endif %}" "{% endif %}"
], ],
"style": { "style": {
"weight": [
"width": [
"{% if tags.waterway == 'river' %}", "{% if tags.waterway == 'river' %}",
"4", "4",
"{% elseif tags.waterway == 'stream' %}", "{% elseif tags.waterway == 'stream' %}",

Loading…
Cancel
Save