Reputation: 47
I have something very similar to this example:
https://developers.google.com/maps/documentation/javascript/examples/directions-simple
All I am trying to do it change the stroke of the line from one city to another city, which is currently a purple color?
I tried putting strokeColor in myOptions, but no luck:
var myOptions = {
zoom:1,
strokeColor: "#000000",
mapTypeId: google.maps.MapTypeId.ROADMAP
}
Upvotes: 2
Views: 6946
Reputation: 444
You can use polylineOptions to change the color of the line
polylineOptions: { strokeColor: '#0088FF', // red strokeWeight: 4, strokeOpacity: 0.6 },
Upvotes: 0
Reputation: 1381
It doesn't look like that's supported without drawing your own line.
Upvotes: 1