As continuing from previous question https://stackoverflow.com/a/35622032/75799
I have many polygon, which they cross each other or get on top of each other.
I wanted to put current active route on top of all the other route, so the color of the polygon shows green on top.
If you check following image, the active polygon is underneath other polygon.
This will set color change on active route.
directionsRenderer2.setOptions({
polylineOptions: {
strokeColor: 'green'
},
map:map
});