Select to view content in your preferred language

How to change default line color in Draw tool

2327
2
Jump to solution
01-18-2017 02:26 PM
PeterLen
Frequent Contributor

Hello,

When using a drawing toolbar and am drawing a polyline, the default color of the line being drawn in the map is red.  Once the drawing ends, I can change the line color for the graphic to anything I want.  My question is how can I change the default color for the line as it is being drawn?  I don't want a red line because I may be drawing over a red line that was previously created.  Can that color be changed?  I thought maybe I could add a SimpleLineSymbol to the Draw object, but I guess not.

Any thoughts?

Thanks - Peter

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Peter,

   You just set the lineSymbol property:

Draw | API Reference | ArcGIS API for JavaScript 3.19 | lineSymbol 

PeterLen
Frequent Contributor

Robert - Nice.  I didn't see that.  I will try this tomorrow, but it looks like the answer.  Thanks for the help.

0 Kudos