You can find this in the API Reference
The DirectionsRendererOptions
object takes a polylineOptions
property where you can define its style.
For example:
var directionsOptions = {
polylineOptions: {
strokeColor: 'red'
}
}
directionsDisplay = new google.maps.DirectionsRenderer(directionsOptions);
Hope this helps!