I try to avoid constantly repainting the route line for better performance.
Now the process works as follows:
-
Active route section is painted with user settings: color, width, arrows, etc.
(active route section: previous waypoint → next waypoint)
When <500m to next waypoint, second next route section is also painted. -
A thin / translucent line is painted from the next waypoint to the destination.
-
In off route situations or when pause the navigation,
the entire route line is painted with the user settings.