Issue #91: support automatic icon generation.

Use regular expressions to match tags and construct icons using matched
substrings.
This commit is contained in:
Sergey Vartanov 2021-09-26 18:23:22 +03:00
parent 4644d38166
commit 39acfc6ff6
4 changed files with 102 additions and 88 deletions

View file

@ -1267,29 +1267,11 @@ node_icons:
shapes: [buffer_stop]
- tags: {traffic_sign: city_limit}
shapes: [city_limit_sign]
- tags: {traffic_sign: maxspeed, maxspeed: "30"}
- tags: {traffic_sign: maxspeed, maxspeed: "(\\d)(\\d)"}
shapes: [
circle_11,
{shape: digit_3, offset: [-2, 0], color: "#FFFFFF"},
{shape: digit_0, offset: [2, 0], color: "#FFFFFF"},
]
- tags: {traffic_sign: maxspeed, maxspeed: "40"}
shapes: [
circle_11,
{shape: digit_4, offset: [-2, 0], color: "#FFFFFF"},
{shape: digit_0, offset: [2, 0], color: "#FFFFFF"},
]
- tags: {traffic_sign: maxspeed, maxspeed: "50"}
shapes: [
circle_11,
{shape: digit_5, offset: [-2, 0], color: "#FFFFFF"},
{shape: digit_0, offset: [2, 0], color: "#FFFFFF"},
]
- tags: {traffic_sign: maxspeed, maxspeed: "60"}
shapes: [
circle_11,
{shape: digit_6, offset: [-2, 0], color: "#FFFFFF"},
{shape: digit_0, offset: [2, 0], color: "#FFFFFF"},
{shape: digit_#maxspeed0, offset: [-2, 0], color: "#FFFFFF"},
{shape: digit_#maxspeed1, offset: [2, 0], color: "#FFFFFF"},
]
- tags: {traffic_sign: maxspeed, maxspeed: "40_mph"}
shapes: [