Browse Source

pt_routes: color routes by type

fossil
parent
commit
e664a00d55
  1. 47
      pt_routes.json

47
pt_routes.json

@ -17,14 +17,17 @@
"description": "{{ tagTrans('route', tags.route) }}", "description": "{{ tagTrans('route', tags.route) }}",
"listMarkerSign": "{{ const[tags.route].sign|raw }}", "listMarkerSign": "{{ const[tags.route].sign|raw }}",
"markerSymbol": null, "markerSymbol": null,
"listMarkerSymbol": "{{ markerCircle({})|raw }}"
"listMarkerSymbol": "{{ markerCircle({fillColor:const[tags.route].color})|raw }}",
"style": {
"color": "{{ const[tags.route].color }}"
}
}, },
"info": [ "info": [
"<table>", "<table>",
"{% for value, data in const %}", "{% for value, data in const %}",
"{% if data.zoom <= map.zoom %}", "{% if data.zoom <= map.zoom %}",
" <tr>", " <tr>",
" <td>{{ markerCircle({})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
" <td>{{ markerCircle({fillColor:data.color})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
" <td>{{ tagTrans('amenity', value) }}</td>", " <td>{{ tagTrans('amenity', value) }}</td>",
" </tr>", " </tr>",
"{% endif %}", "{% endif %}",
@ -33,36 +36,44 @@
], ],
"const": { "const": {
"train": { "train": {
"sign": "<img src='maki:rail'>",
"zoom": 12
"sign": "<img src='maki:rail?fill=#ffffff'>",
"zoom": 12,
"color": "#202020"
}, },
"subway": { "subway": {
"sign": "<img src='maki:rail-metro'>",
"zoom": 12
"sign": "<img src='maki:rail-metro?fill=#ffffff'>",
"zoom": 12,
"color": "#00007f"
}, },
"monorail": { "monorail": {
"sign": "M",
"zoom": 12
"sign": "<span style='color: #ffffff'>M</span>",
"zoom": 12,
"color": "#006f8f"
}, },
"tram": { "tram": {
"sign": "<img src='maki:rail-light'>",
"zoom": 12
"sign": "<img src='maki:rail-light?fill=#ffffff'>",
"zoom": 12,
"color": "#7f007f"
}, },
"bus": { "bus": {
"sign": "<img src='maki:bus'>",
"zoom": 12
"sign": "<img src='maki:bus?fill=#ffffff'>",
"zoom": 12,
"color": "#af0000"
}, },
"trolleybus": { "trolleybus": {
"sign": "<img src='maki:bus?fill=#5f0000'>",
"zoom": 12
"sign": "<img src='maki:bus?fill=#ffffff'>",
"zoom": 12,
"color": "#af3f00"
}, },
"aerialway": { "aerialway": {
"sign": "<img src='maki:aerialway'>",
"zoom": 12
"sign": "<img src='maki:aerialway?fill=#ffffff'>",
"zoom": 12,
"color": "#00aaaa"
}, },
"ferry": { "ferry": {
"sign": "<img src='maki:ferry'>",
"zoom": 12
"sign": "<img src='maki:ferry?fill=#ffffff'>",
"zoom": 12,
"color": "#007fff"
} }
} }
} }
Loading…
Cancel
Save