I have an app where it will display 10 dots with same color, now based upon some condition I want to change the color of one dot
Not 100% sure of what you are asking, but here is my guess.
I have a featurelayer called "operationsPointLayer" and in it's attributes table I have a field called "VERIFIED", it has 2 possible values Y or N. I draw the Y as green and N as red.
var recordRenderer = new UniqueValueRenderer(defaultSymbol, "VERIFIED");
recordRenderer.addValue("Y", new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 8, null, new Color([0,204,0])));
recordRenderer.addValue("N", new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 8, null, new Color([255,0,0])));
operationsPointLayer.setRenderer(recordRenderer);
When I edit the data and change N to Y the points change color.
Or are you asking for the points to change color when selected in the map? In that case here is an example.
Select with Feature Layer | ArcGIS API for JavaScript 3.19
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.