Colors in L.mapquest.directionsLayer(options)

2 posts / 0 new
Last post
Colors in L.mapquest.directionsLayer(options)


This option in L.mapquest.directionsLayer(options)

alternateRouteRibbon: {
color: "#808000",
opacity: 0.4,
showTraffic: false


print all the alternatives routes in the same color.


Exist any way to print each alternative route in a different color?


Thanks for your time.

There is no setting in the
There is no setting in the existing directionsLayer to set each alternate route a different color. You can make the directions request directly to the API and display the results with a polyline though.