AnsweredAssumed Answered

UniqueValueRenderer - Transparency issue with SimpleMarkerSymbol

Question asked by csgeosol1 Champion on May 22, 2015
Latest reply on May 22, 2015 by csgeosol1

Hello,

 

I am having an issue with transparency not being recognized:

 

var renderer = new UniqueValueRenderer(defaultSymbol, "flag");

renderer.addValue("0", new SimpleMarkerSymbol().setColor(new Color([255, 0, 0, 0.75])).setSize("6").setOutline((new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0, 0.75]), 2))));
renderer.addValue("1", new SimpleMarkerSymbol().setColor(new Color([0, 71, 171, 0.75])).setSize("6").setOutline((new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([0, 71, 171, 0.75]), 2))));

featureLayer.setRenderer(renderer);

This results in something like this:

 

 

Which does not exhibit any sort of transparency. Previously, I symbolized directly in the layer definition:

 

                    "drawingInfo": {
                        "renderer": {
                            "type": "simple",
                            "symbol": {
                                "color": [0, 0, 255, 115],
                                "size": 4.20,
                                "angle": -30,
                                "xoffset": 0,
                                "yoffset": 0,
                                "type": "esriSMS",
                                "style": "esriSMSCircle"
                            }
                        }
                    },

 

Interestingly, the alpha value here seems to be using a different opacity method... not 0.0 to 1.0 - rather, 115 produces this result:

 

 

I am using v3.12 and have cleared browser cache/restarted multiple times using IE and Chrome. Any ideas would be appreciated!

 

Thanks!

Outcomes