Browse Source

Lanes: add cycleway=track resp. cycleway=opposite_track

name-etym
parent
commit
86a6bdfc09
  1. 28
      lanes.json

28
lanes.json

@ -20,6 +20,8 @@
"{% set oneway = tags.oneway in ['yes','1'] %}",
"{% set cyclelane_left = attribute(tags, 'cycleway:left') == 'lane' ? 1 : ('opposite_lane' in tags.cycleway|split(';') ? 1 : (('lane' in tags.cycleway|split(';')) and not oneway ? 1 : 0)) %}",
"{% set cyclelane_right = attribute(tags, 'cycleway:right') == 'lane' ? 1 : ('lane' in tags.cycleway|split(';') ? 1 : 0) %}",
"{% set cycletrack_left = attribute(tags, 'cycleway:left') == 'track' ? 1 : ('opposite_track' in tags.cycleway|split(';') ? 1 : (('track' in tags.cycleway|split(';')) and not oneway ? 1 : 0)) %}",
"{% set cycletrack_right = attribute(tags, 'cycleway:right') == 'track' ? 1 : ('track' in tags.cycleway|split(';') ? 1 : 0) %}",
"{% set sidewalk_left = tags.sidewalk in ['both', 'left'] ? 1 : 0 %}",
"{% set sidewalk_right = tags.sidewalk in ['both', 'right'] ? 1 : 0 %}",
"{% set lanes = tags.lanes|default(oneway ? 1 : 2) %}",
@ -38,7 +40,7 @@
],
"markerSymbol": null,
"listMarkerSymbol": "line",
"styles": "{% if sidewalk_left %}sidewalk_left,{% endif %}{% if parking_left %}parking_left,{% endif %}{% if cyclelane_left %}cyclelane_left,{% endif %}{% if lanes == 1 %}lane1{% else %}{% for i in 1..lanes - 1 %}lane{{ i }},mark{{ i }},{% endfor %}lane{{ lanes }}{% endif %}{% if cyclelane_right %},cyclelane_right{% endif %}{% if parking_right %},parking_right{% endif %}{% if sidewalk_right %},sidewalk_right{% endif %}",
"styles": "{% if sidewalk_left %}sidewalk_left,{% endif %}{% if cycletrack_left %}cycletrack_left,{% endif %}{% if parking_left %}parking_left,{% endif %}{% if cyclelane_left %}cyclelane_left,{% endif %}{% if lanes == 1 %}lane1{% else %}{% for i in 1..lanes - 1 %}lane{{ i }},mark{{ i }},{% endfor %}lane{{ lanes }}{% endif %}{% if cyclelane_right %},cyclelane_right{% endif %}{% if parking_right %},parking_right{% endif %}{% if cycletrack_right %},cycletrack_right{% endif %}{% if sidewalk_right %},sidewalk_right{% endif %}",
"style": {
"width": "{{ width }}",
"pane": "casing",
@ -47,7 +49,7 @@
"style:sidewalk_left": {
"width": "2m",
"color": "#4f4fbf",
"offset": "{{ lanes_width / -2 - (cyclelane_left * 2) - (parking_left * 2) - 1 }}m",
"offset": "{{ lanes_width / -2 - (cyclelane_left * 2) - (parking_left * 2) - (cycletrack_left * 2) - 1 }}m",
"pane": "casing"
},
"style:parking_left": {
@ -68,6 +70,18 @@
"offset": "{{ lanes_width / 2 + 1 }}m",
"pane": "casing"
},
"style:cycletrack_left": {
"width": "2m",
"color": "#bf5f3f",
"offset": "{{ lanes_width / -2 - (cyclelane_left * 2) - (parking_left * 2) - 1 }}m",
"pane": "casing"
},
"style:cycletrack_right": {
"width": "2m",
"color": "#bf5f3f",
"offset": "{{ lanes_width / 2 + (cyclelane_right * 2) + (parking_right * 2) + 1 }}m",
"pane": "casing"
},
"style:parking_right": {
"width": "2m",
"color": "orange",
@ -77,7 +91,7 @@
"style:sidewalk_right": {
"width": "2m",
"color": "#4f4fbf",
"offset": "{{ lanes_width / 2 + (cyclelane_right * 2) + (parking_right * 2) + 1 }}m",
"offset": "{{ lanes_width / 2 + (cyclelane_right * 2) + (parking_right * 2) + (cycletrack_right * 2) + 1 }}m",
"pane": "casing"
},
"style:lane1": {
@ -230,10 +244,18 @@
" <td>{{ keyTrans('lanes') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine({ 'width': 5, 'color': 'orange' })|raw }}</td>",
" <td>{{ keyTrans('parking:lane') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine({ 'width': 5, 'color': '#af3f3f' })|raw }}</td>",
" <td>{{ tagTrans('cycleway', 'lane') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine({ 'width': 5, 'color': '#bf5f3f' })|raw }}</td>",
" <td>{{ tagTrans('cycleway', 'track') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine({ 'width': 5, 'color': '#4f4fbf' })|raw }}</td>",
" <td>{{ keyTrans('sidewalk') }}</td>",
" </tr>",

Loading…
Cancel
Save