I read in geonet that:
"In version 3.X of the API you could specify the outline color separately from the inner color, but I the 4.X LineSymbol does not have that property. "
So, in 3.x how would you modify/add the below to add a black outline.
sfs = new SimpleRenderer(new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SOLID,
new Color([255, 236, 176, 3]),
5)
)
Thanks,.
Solved! Go to Solution.
No Two Graphics with the different line weights
Lefteris,
Not sure where you read that. In either API there is no property for defining an outline color of a line.
See my workaround response in this thread
https://community.esri.com/thread/184769-red-line-with-black-outline-in-javascript-api
ok Thanks.
I read the posting at geonet at a number of places like at:
https://community.esri.com/thread/231763-simplelinesymbol-with-line-border
Read the last response.
Did you mean something like this. IT seems that only the first linesymbol is drawn.
sfs = new SimpleRenderer(new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SOLID,
new Color([255, 236, 176]),
3),
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SOLID,
new Color([0, 0, 0]),
5)
)
No Two Graphics with the different line weights
ok Got it. In my case is a bit more work because I am using the featurelayer.setRenderer. I don't assign the symbol on each feature.
So I do need an extra fL with the second color.
Then I have to make sure that layerlist and legend don't list the extra fL.
Thanks.
That is a good workaround if you really need this two color line. You will also have to consider how to turn both layers off when the user set one of the layer to not be visible.