how to change feature layer's outline color only?

2837
4
05-07-2016 04:12 PM
LinhNguyen2
New Contributor

Need help here.. I use the simpleRender with simpleFillSymbol to change the outine color,

but the problem is that it also override the featurelayer's fill color too..

Is there a way just to change the outline color only?

Thanks.

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Linh,

  What does your code look like right now to change the outline? Are you getting the renderers symbol using "getsymbol" method and then using the "setOutline" method?

0 Kudos
LinhNguyen2
New Contributor

I have SimpleFillSymbol

var simpleFillSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_NULL,
    new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT,
    new Color([255, 0, 0]), 1);


then a render
        var simpleRender = new SimpleRender(simpleFillSymbol);

then I set the featureLayer

featureLayer.setRenderer(simpleRender);

this feature already including polygons and fill colors based on their characteristics., ie... yellow red, blue, etc..

all I want is to change the outline color..

THanks.

0 Kudos
LinhNguyen2
New Contributor

I got it..  by get their symbols and reset their outline.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Linh,

  Glad you got what I was saying. Be sure to mark this thread as answered by clicking on the correct answer link for the post that answered your question.

0 Kudos