On Apr 10, 6:37 pm, compto35 <[email protected]> wrote:
> Hey all. I'm trying to change the color of the polyline on my google
> directions. This code doesn't work, and I'm not exactly sure why:

That code isn't the code on the page that you gave a link to.

>
> var polylineOpts = {map: map, strokeColor:'#000000', strokeWidth: 3,
> strokeOpacity: 0.5}
>
>     var directionsService = new google.maps.DirectionsService;
>     function requestDirections(start, end) {
>       directionsService.route({
>         origin: start,
>         waypoints: waypts,
>                 optimizeWaypoints: true,
>                 destination: end,
>                 polylineOptions: polylineOpts,
>         travelMode: google.maps.DirectionsTravelMode.BICYCLING
>       }, function(result) {
>         renderDirections(result);
>       });
>     }
>     requestDirections('East Lansing, MI', 'Ann Arbor, MI');
>
> Link here:

http://joshdcompton.com/google_maps/mult_directions/test.html

The code on the page above doesn't use the rendererOptions in the call
to the directionsRenderer, and the rendererOptions doesn't include
polylineOptions in it.

  -- Larry

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to