Apply transparency for graphics

427
0
09-23-2019 12:27 PM
DevendraKhatri
New Contributor III

I have a list of feature layers, on selection of it [ multi-select ], I draw underlying geometries on the map as graphics. 

I am using graphicOverlays.

mGraphicsOverlay.getGraphics().add(graphic);

My need is, I have a mapping for transparency attached to each layer and graphicOverlay should consider it.

I am doing this way.

mGraphicsOverlay.setOpacity((float) transparency / 100);

Problem is, when I select another layer, other graphics's transparency changes to currently selected layer's transparency.

Do we have any solution for adding opacity to individual symbol/graphics, as we have for JS SDK.  markerSymbol.color.a

I can instantiate one graphic overlay for each selection, and remove when deselected, but this method is little weird.

Let me know a good way.

0 Kudos
0 Replies