How colored waypoints or polyline directions in google map display v3 service

I am using the gmap v3 service. I use waypoints. I show three routes, and I want all three routes to be different colors. How to change the color of routes?

+3
source share
1 answer

All routes use PolyLines, and you can set the color by passing them http://code.google.com/apis/maps/documentation/javascript/reference.html#PolylineOptions

The only problem is that each DirectionRenderer can have only one type of PolyLines, so you need to have more than one DirectionRenderer, as far as I can understand, and I'm not sure how they will work together if you try to display them on the same map.

0
source

All Articles