"pre":"{% if tags.maxspeed is not defined %}\n{% set maxspeedKmh = null %}\n{% set maxspeed = null %}\n{% set unit = null %}\n{% else %}\n\n{% if tags.maxspeed|matches(\"^[0-9]+$\") %}\n{% set maxspeedKmh = tags.maxspeed %}\n{% set maxspeed = tags.maxspeed %}\n{% set unit = \"km/h\" %}\n{% endif %}\n\n\n{% set m = tags.maxspeed|matches(\"(^[0-9]+) mph$\") %}\n{% if m %}\n{% set maxspeedKmh = m[1] * 1.60934 %}\n{% set maxspeed = m[1] %}\n{% set unit = \"mph\" %}\n{% endif %}\n\n{% endif %}\n\n{% if not maxspeedKmh %}\n{% set color = \"#404040\" %}\n{% else %}\n{% set color = colorInterpolate([ 'green', 'orange', 'red' ], maxspeedKmh / 150) %}\n{% endif %}",
"description":"{% if maxspeed %}\n<span style='color: {{ color }}'>{{ maxspeed }} {{ unit }}</span>\n{% else %}\n{{ trans('unknown') }}\n{% endif %}",
"pre":[
"{% if tags.maxspeed is not defined %}",
"{% set maxspeedKmh = null %}",
"{% set maxspeed = null %}",
"{% set unit = null %}",
"{% else %}",
"",
"{% if tags.maxspeed|matches(\"^[0-9]+$\") %}",
"{% set maxspeedKmh = tags.maxspeed %}",
"{% set maxspeed = tags.maxspeed %}",
"{% set unit = \"km/h\" %}",
"{% endif %}",
"",
"",
"{% set m = tags.maxspeed|matches(\"(^[0-9]+) mph$\") %}",
"{% if m %}",
"{% set maxspeedKmh = m[1] * 1.60934 %}",
"{% set maxspeed = m[1] %}",
"{% set unit = \"mph\" %}",
"{% endif %}",
"",
"{% endif %}",
"",
"{% if not maxspeedKmh %}",
"{% set color = \"#404040\" %}",
"{% else %}",
"{% set color = colorInterpolate([ 'green', 'orange', 'red' ], maxspeedKmh / 150) %}",
"{% endif %}"
],
"description":[
"{% if maxspeed %}",
"<span style='color: {{ color }}'>{{ maxspeed }} {{ unit }}</span>",
"pre":"{% if tags.highway == 'construction' %}\n{% set key = 'highway' %}\n{% set value = tags.highway %}\n{% else %}\n{% set key = 'landuse' %}\n{% set value = tags.landuse %}\n{% endif %}",
"pre":"{% if tags.amenity in [ 'arts_centre', 'cinema', 'community_centre', 'fountain', 'studio', 'theatre' ] %}\n{% set key = 'amenity' %}\n{% set value = tags.amenity %}\n{% elseif tags.tourism %}\n{% set key = 'tourism' %}\n{% set value = tags.tourism %}\n{% endif %}",
"pre":[
"{% if tags.amenity in [ 'arts_centre', 'cinema', 'community_centre', 'fountain', 'studio', 'theatre' ] %}",
"pre":"{% if tags.shop in [ 'bicycle' ] %}\n {% set key = 'shop' %}\n {% set value = tags.shop %}\n{% elseif attribute(tags, \"monitoring:bicycle\") %}\n {% set key = 'man_made' %}\n {% set value = 'monitoring_station' %}\n{% elseif tags.vending in [ 'bicycle_tube' ] %}\n {% set key = 'vending' %}\n {% set value = tags.vending %}\n{% else %}\n {% set key = 'amenity' %}\n {% set value = tags.amenity %}\n{% endif %}\n\n{% set constIndex = (key ~ \"=\" ~ value) %}",
"priority":"{% if const[constIndex] and const[constIndex]['priority']['capacity'] %}\n {% set max=const[constIndex]['priority']['default'] %}\n {% for v in const[constIndex]['priority']['capacity'] %}\n {% if tags.capacity >= v[0] %}{% set max=v[1] %}{% endif %}\n {% endfor %}\n {{ max }}\n{% elseif const[constIndex] is defined %}\n{{ const[constIndex]['priority'] }}\n{% else %}\n10\n{% endif %}"
"pre":"{% if tags.emergency in [ 'defibrillator' ] %}\n {% set key = 'emergency' %}\n {% set value = tags.emergency %}\n{% elseif tags.healthcare %}\n {% set key = 'healthcare' %}\n {% set value = tags.healthcare %}\n{% else %}\n {% set key = 'amenity' %}\n {% set value = tags.amenity %}\n{% endif %}\n",
"pre":"{% if tags.military %}\n {% set key = 'military' %}\n {% set value = tags.military %}\n{% else %}\n {% set key = 'landuse' %}\n {% set value = tags.landuse %}\n{% endif %}",
"pre":"{% if tags.railway == 'subway_entrance' %}\n {% set key = 'railway' %}\n {% set value = tags.railway %}\n{% else %}\n {% set key = 'amenity' %}\n {% set value = tags.amenity %}\n{% endif %}",
"pre":"{% if tags.amenity in [ 'ferry_terminal', 'bus_station' ] %}\n {% set key = 'amenity' %}\n {% set value = tags.amenity %}\n{% elseif tags.railway == 'platform' or tags.highway == 'platform' or tags.public_transport == 'platform' %}\n {% set key = 'public_transport' %}\n {% set value = 'platform' %}\n{% else %}\n {% set key = 'public_transport' %}\n {% set value = 'stop_position' %}\n{% endif %}",
"pre":[
"{% if tags.amenity in [ 'ferry_terminal', 'bus_station' ] %}",
" {% set key = 'amenity' %}",
" {% set value = tags.amenity %}",
"{% elseif tags.railway == 'platform' or tags.highway == 'platform' or tags.public_transport == 'platform' %}",
"pre":"{% if tags.landuse == 'cemetery' %}\n{% set key = 'landuse' %}\n{% set value = tags.landuse %}\n{% else %}\n{% set key = 'amenity' %}\n{% set value = tags.amenity %}\n{% endif %}",
"pre":"{% if tags.landuse in [ 'quarry', 'salt_pond' ] %}\n {% set key = 'landuse' %}\n {% set value = tags.landuse %}\n{% else %}\n {% set key = 'man_made' %}\n {% set value = tags.man_made %}\n{% endif %}",
"pre":[
"{% if tags.landuse in [ 'quarry', 'salt_pond' ] %}",
"pre":"{% if tags.information %}\n {% set key = 'information' %}\n {% set value = tags.information %}\n{% elseif tags.amenity in [ 'bench', 'shelter' ] %}\n {% set key = 'amenity' %}\n {% set value = tags.amenity %}\n{% elseif tags.man_made in [ 'cairn' ] %}\n {% set key = 'man_made' %}\n {% set value = tags.man_made %}\n{% elseif tags.tourism in [ 'viewpoint'] %}\n {% set key = 'tourism' %}\n {% set value = tags.tourism %}\n{% else %}\n {% set key = 'highway' %}\n {% set value = tags.highway %}\n{% endif %}\n\n{% set type_data = const[value] %}",
"pre":[
"{% if tags.information %}",
" {% set key = 'information' %}",
" {% set value = tags.information %}",
"{% elseif tags.amenity in [ 'bench', 'shelter' ] %}",
"pre":"{% set errors = [] %}\n{% for k, v in tags %}\n\n{% if k|matches(\"^wikipedia:\") %}\n {% set errors = errors|merge([\"Uses <tt>wikipedia</tt> and old-style <tt>\" ~ k ~ \"</tt> tag\"]) %}\n{% elseif k|matches(\"^wikipedia:\") %}\n {% set errors = errors|merge([\"Uses old-style <tt>\" ~ k ~ \"</tt> tag\"]) %}\n{% endif %}\n\n{% if k|matches(\":?wikipedia$\") and not v|matches(\"^[a-z-]+:\") %}\n {% set errors = errors|merge([\"Tag <tt>\" ~ k ~ \"</tt> does not contain language information: \" ~ v ]) %}\n{% endif %}\n\n{% endfor %}",
"body":"{% if errors|length %}\n{{ trans('error', errors|length) }}:<ul>\n{% for e in errors %}\n <li>{{ e|raw }}</li>\n{% endfor %}\n</ul>\n{% endif %}"
"pre":[
"{% set errors = [] %}",
"{% for k, v in tags %}",
"",
"{% if k|matches(\"^wikipedia:\") %}",
" {% set errors = errors|merge([\"Uses <tt>wikipedia</tt> and old-style <tt>\" ~ k ~ \"</tt> tag\"]) %}",
"{% elseif k|matches(\"^wikipedia:\") %}",
" {% set errors = errors|merge([\"Uses old-style <tt>\" ~ k ~ \"</tt> tag\"]) %}",
"{% endif %}",
"",
"{% if k|matches(\":?wikipedia$\") and not v|matches(\"^[a-z-]+:\") %}",
" {% set errors = errors|merge([\"Tag <tt>\" ~ k ~ \"</tt> does not contain language information: \" ~ v ]) %}",