|
@ -21,8 +21,8 @@ |
|
|
"{% set unit = null %}", |
|
|
"{% set unit = null %}", |
|
|
"", |
|
|
"", |
|
|
"{% if tags.maxspeed is defined %}", |
|
|
"{% if tags.maxspeed is defined %}", |
|
|
" {% if tags.maxspeed == 'none' %}", |
|
|
|
|
|
" {% set maxspeed = 'none' %}", |
|
|
|
|
|
|
|
|
" {% if const.colorOther[tags.maxspeed] %}", |
|
|
|
|
|
" {% set maxspeed = tags.maxspeed %}", |
|
|
" {% elseif tags.maxspeed|matches(\"^[0-9]+$\") %}", |
|
|
" {% elseif tags.maxspeed|matches(\"^[0-9]+$\") %}", |
|
|
" {% set maxspeedKmh = tags.maxspeed %}", |
|
|
" {% set maxspeedKmh = tags.maxspeed %}", |
|
|
" {% set maxspeed = tags.maxspeed %}", |
|
|
" {% set maxspeed = tags.maxspeed %}", |
|
@ -36,8 +36,9 @@ |
|
|
"{% endif %}", |
|
|
"{% endif %}", |
|
|
"", |
|
|
"", |
|
|
"{% if attribute(tags, 'maxspeed:forward') is defined %}", |
|
|
"{% if attribute(tags, 'maxspeed:forward') is defined %}", |
|
|
" {% if attribute(tags, 'maxspeed:forward') == 'none' %}", |
|
|
|
|
|
" {% set maxspeedF = 'none' %}", |
|
|
|
|
|
|
|
|
" {% set x = attribute(tags, 'maxspeed:forward') %}", |
|
|
|
|
|
" {% if const.colorOther[x] %}", |
|
|
|
|
|
" {% set maxspeedF = attribute(tags, 'maxspeed:forward') %}", |
|
|
" {% elseif attribute(tags, 'maxspeed:forward')|matches(\"^[0-9]+$\") %}", |
|
|
" {% elseif attribute(tags, 'maxspeed:forward')|matches(\"^[0-9]+$\") %}", |
|
|
" {% set maxspeedFKmh = attribute(tags, 'maxspeed:forward') %}", |
|
|
" {% set maxspeedFKmh = attribute(tags, 'maxspeed:forward') %}", |
|
|
" {% set maxspeedF = attribute(tags, 'maxspeed:forward') %}", |
|
|
" {% set maxspeedF = attribute(tags, 'maxspeed:forward') %}", |
|
@ -51,8 +52,9 @@ |
|
|
"{% endif %}", |
|
|
"{% endif %}", |
|
|
"", |
|
|
"", |
|
|
"{% if attribute(tags, 'maxspeed:backward') is defined %}", |
|
|
"{% if attribute(tags, 'maxspeed:backward') is defined %}", |
|
|
" {% if attribute(tags, 'maxspeed:backward') == 'none' %}", |
|
|
|
|
|
" {% set maxspeedB = 'none' %}", |
|
|
|
|
|
|
|
|
" {% set x = attribute(tags, 'maxspeed:backward') %}", |
|
|
|
|
|
" {% if const.colorOther[x] %}", |
|
|
|
|
|
" {% set maxspeedB = attribute(tags, 'maxspeed:backward') %}", |
|
|
" {% elseif attribute(tags, 'maxspeed:backward')|matches(\"^[0-9]+$\") %}", |
|
|
" {% elseif attribute(tags, 'maxspeed:backward')|matches(\"^[0-9]+$\") %}", |
|
|
" {% set maxspeedBKmh = attribute(tags, 'maxspeed:backward') %}", |
|
|
" {% set maxspeedBKmh = attribute(tags, 'maxspeed:backward') %}", |
|
|
" {% set maxspeedB = attribute(tags, 'maxspeed:backward') %}", |
|
|
" {% set maxspeedB = attribute(tags, 'maxspeed:backward') %}", |
|
@ -65,8 +67,8 @@ |
|
|
" {% endif %}", |
|
|
" {% endif %}", |
|
|
"{% endif %}", |
|
|
"{% endif %}", |
|
|
"", |
|
|
"", |
|
|
"{% if maxspeed == 'none' %}", |
|
|
|
|
|
"{% set color = \"#0000ff\" %}", |
|
|
|
|
|
|
|
|
"{% if const.colorOther[maxspeed] %}", |
|
|
|
|
|
"{% set color = const.colorOther[maxspeed] %}", |
|
|
"{% elseif not maxspeedKmh %}", |
|
|
"{% elseif not maxspeedKmh %}", |
|
|
"{% set color = \"#404040\" %}", |
|
|
"{% set color = \"#404040\" %}", |
|
|
"{% else %}", |
|
|
"{% else %}", |
|
@ -87,9 +89,9 @@ |
|
|
], |
|
|
], |
|
|
"description": [ |
|
|
"description": [ |
|
|
"{% if maxspeedF or maxspeedB %}", |
|
|
"{% if maxspeedF or maxspeedB %}", |
|
|
"<span style='color: {{ colorB }}'>{{ maxspeedB == 'none' ? tagTrans('maxspeed', 'none') : maxspeedB|default(trans('unknown')) }}</span> / <span style='color: {{ colorF }}'>{{ maxspeedF == 'none' ? tagTrans('maxspeed', 'none') : maxspeedF|default(trans('unknown')) }}</span> {{ unit }}", |
|
|
|
|
|
|
|
|
"<span style='color: {{ colorB }}'>{{ const.colorOther[maxspeedB] ? tagTrans('maxspeed', maxspeedB) : maxspeedB|default(trans('unknown')) }}</span> / <span style='color: {{ colorF }}'>{{ const.colorOther[maxspeedF] ? tagTrans('maxspeed', maxspeedF) : maxspeedF|default(trans('unknown')) }}</span> {{ unit }}", |
|
|
"{% elseif maxspeed %}", |
|
|
"{% elseif maxspeed %}", |
|
|
"<span style='color: {{ color }}'>{{ maxspeed == 'none' ? tagTrans('maxspeed', 'none') : maxspeed }} {{ unit }}</span>", |
|
|
|
|
|
|
|
|
"<span style='color: {{ color }}'>{{ const.colorOther[maxspeed] ? tagTrans('maxspeed', maxspeed) : maxspeed }} {{ unit }}</span>", |
|
|
"{% elseif tags.maxspeed %}", |
|
|
"{% elseif tags.maxspeed %}", |
|
|
"{{ tags.maxspeed }}", |
|
|
"{{ tags.maxspeed }}", |
|
|
"{% else %}", |
|
|
"{% else %}", |
|
@ -131,6 +133,10 @@ |
|
|
"#ff0000", |
|
|
"#ff0000", |
|
|
"#af00af" |
|
|
"#af00af" |
|
|
], |
|
|
], |
|
|
|
|
|
"colorOther": { |
|
|
|
|
|
"none": "#0000ff", |
|
|
|
|
|
"walk": "#00afff" |
|
|
|
|
|
}, |
|
|
"highestColorSpeed": 150, |
|
|
"highestColorSpeed": 150, |
|
|
"offsetColorSpeed": 10 |
|
|
"offsetColorSpeed": 10 |
|
|
}, |
|
|
}, |
|
@ -141,6 +147,10 @@ |
|
|
" <td>{{ markerLine(evaluate({}))|raw }}</td>", |
|
|
" <td>{{ markerLine(evaluate({}))|raw }}</td>", |
|
|
" <td colspan>{{ trans('unknown') }}</td>", |
|
|
" <td colspan>{{ trans('unknown') }}</td>", |
|
|
" </tr>", |
|
|
" </tr>", |
|
|
|
|
|
" <tr>", |
|
|
|
|
|
" <td>{{ markerLine(evaluate({ \"maxspeed\": \"walk\" }))|raw }}</td>", |
|
|
|
|
|
" <td colspan>{{ tagTrans('maxspeed', 'walk') }}</td>", |
|
|
|
|
|
" </tr>", |
|
|
"{% for i in range(10, 140, 20) %}", |
|
|
"{% for i in range(10, 140, 20) %}", |
|
|
" <tr>", |
|
|
" <tr>", |
|
|
" <td>{{ markerLine(evaluate({ \"maxspeed\": i }))|raw }}</td>", |
|
|
" <td>{{ markerLine(evaluate({ \"maxspeed\": i }))|raw }}</td>", |
|
@ -163,6 +173,10 @@ |
|
|
" <td>{{ markerLine(evaluate({}))|raw }}</td>", |
|
|
" <td>{{ markerLine(evaluate({}))|raw }}</td>", |
|
|
" <td colspan>{{ trans('unknown') }}</td>", |
|
|
" <td colspan>{{ trans('unknown') }}</td>", |
|
|
" </tr>", |
|
|
" </tr>", |
|
|
|
|
|
" <tr>", |
|
|
|
|
|
" <td>{{ markerLine(evaluate({ \"maxspeed\": \"walk\" }))|raw }}</td>", |
|
|
|
|
|
" <td colspan>{{ tagTrans('maxspeed', 'walk') }}</td>", |
|
|
|
|
|
" </tr>", |
|
|
"{% for i in range(10, 60, 10) %}", |
|
|
"{% for i in range(10, 60, 10) %}", |
|
|
" <tr>", |
|
|
" <tr>", |
|
|
" <td>{{ markerLine(evaluate({ \"maxspeed\": (i * 1.60934)|round }))|raw }}</td>", |
|
|
" <td>{{ markerLine(evaluate({ \"maxspeed\": (i * 1.60934)|round }))|raw }}</td>", |
|
|