@@ -13,16 +13,18 @@ This naming scheme assumes the following algorithm for translating the Mapbox Di
1313 * If ` valid_indication ` is leftward, prepend ` opposite ` to any rightward indication and set the ` flipped ` flag.
1414 * If ` valid_indication ` is rightward, prepend ` opposite ` to any leftward indication.
1515 * Otherwise, if the array contains a leftward indication, set the ` flipped ` flag.
16- 1 . For each indication, replace any occurrence of ` left ` or ` right ` with ` turn ` .
17- 1 . If ` valid_indication ` is set, replace any occurrence of ` left ` or ` right ` with ` turn ` .
16+ 1 . For each indication, replace any occurrence of ` left ` or ` right ` with ` turn ` inside the indication .
17+ 1 . If ` valid_indication ` is set, replace any occurrence of ` left ` or ` right ` with ` turn ` inside ` valid_indication ` .
18181 . Sort the array of indications in the following order: ` opposite uturn ` , ` opposite sharp turn ` , ` opposite turn ` , ` opposite slight turn ` , ` straight ` , ` slight turn ` , ` turn ` , ` sharp turn ` , ` uturn ` .
19191 . If there are more than three indications, keep one that matches ` valid_indication ` and two others and discard the rest.
20201 . Set the canvas name to ` lane ` followed by the array of indications joined by ` or ` .
21211 . If ` valid_indication ` is set, append ` using ` and the value of ` valid_indication ` to the canvas name.
22221 . Look up the canvas by name:
2323 * If the canvas exists, draw it using the ` primary_color ` and ` secondary_color ` .
2424 * Otherwise, if it does not exist:
25- * If ` valid_indication ` is set, draw the canvas with that name using the ` primary_color ` .
25+ * If ` valid_indication ` is set:
26+ 1 . Set the canvas name to the value of ` valid_indication ` , followed by ` using ` , followed by the value of ` valid_indication ` .
27+ 1 . Draw the canvas with that name using the ` primary_color ` .
2628 * Otherwise, if ` valid_indication ` is unset, draw the canvas ` straight ` using the ` secondary_color ` .
27291 . If the ` flipped ` flag is set, flip the image horizontally.
2830
0 commit comments