Browse Source

Lanes: improve cycleway=lane, cycleway:left/right=lane

name-etym
parent
commit
4f9978e596
  1. 12
      lanes.json

12
lanes.json

@ -17,9 +17,9 @@
"pre": [
"{% set parking_left = attribute(tags, 'parking:lane:left')|default(attribute(tags, 'parking:lane:both')) %}",
"{% set parking_right = attribute(tags, 'parking:lane:right')|default(attribute(tags, 'parking:lane:both')) %}",
"{% set cyclelane_left = 'opposite_lane' in tags.cycleway|split(';') ? 1 : 0 %}",
"{% set cyclelane_right = 'lane' in tags.cycleway|split(';') ? 1 : 0 %}",
"{% 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 lanes = tags.lanes|default(oneway ? 1 : 2) %}",
"{% set lanes_width = lanes * 3 %}",
"{% set forward_lanes = attribute(tags, 'lanes:forward')|default(oneway ? lanes : lanes // 2) %}",
@ -50,13 +50,13 @@
},
"style:cyclelane_left": {
"width": "2m",
"color": "green",
"color": "#af3f3f",
"offset": "{{ lanes_width / -2 - 1 }}m",
"pane": "casing"
},
"style:cyclelane_right": {
"width": "2m",
"color": "green",
"color": "#af3f3f",
"offset": "{{ lanes_width / 2 + 1 }}m",
"pane": "casing"
},
@ -215,6 +215,10 @@
" <td>{{ markerLine({'styles':'left,right,mark', 'style:left': { 'width': 3, 'color': 'grey', 'offset': -1.5 },'style:right': { 'width': 3, 'color': 'grey', 'offset': 1.5 },'style:mark': { 'width': 1, 'color': 'white', 'dashArray': '5,5'} })|raw }}</td>",
" <td>{{ keyTrans('lanes') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine({ 'width': 5, 'color': '#af3f3f' })|raw }}</td>",
" <td>{{ tagTrans('cycleway', 'lane') }}</td>",
" </tr>",
"</table>"
]
}
Loading…
Cancel
Save