How to change the color of route via directional service ionic3?

hi ,
I have implementing the live tracking in our application but i need to change the color of the route but we check our scenario
Example :
Suppose our bus is arrirved from point A to E location now we have change the route color to red becasue bus is reached from A to B, now next route B to E route have different color bcause its upcoming route.
so we have set 2 different color for upcoming routes and reached route i am not using polyline in my code i am using directional service.
i am using propertly strokeColor but how to set via different location?