Search code examples
google-mapsstroke

Google Maps Driving Directions, change Stroke Color?


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
      }

Solution

  • It doesn't look like that's supported without drawing your own line.

    http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/23d27531c01c1086/7cf9db34abcf4f12?lnk=gst&q=change+color+route+&pli=1