Example : -------------- here alternative dash with red and yellow color.
How to create a Dash Line with alternative different colour in esri ? Can we achieve this using SimpleLineSymbol?
309 Views Asked by gaurav sardana At
2
There are 2 best solutions below
1

You can color lines according to specific conditions.
routeSymbols = {
"Route 1": new SimpleLineSymbol().setColor(new Color([0,0,255,0.5])).setWidth(5),
"Route 2": new SimpleLineSymbol().setColor(new Color([0,255,0,0.5])).setWidth(5),
"Route 3": new SimpleLineSymbol().setColor(new Color([255,0,255,0.5])).setWidth(5)
};
//Three different drawings can be made.
map.graphics.add(routeResult.route.setSymbol(routeSymbols[routeResult.routeName]))
if anyone is looking, one solid line with dashed line on top: