AnsweredAssumed Answered

UniqueValueRenderer with array of values

Question asked by marco.brugna on Feb 26, 2013
Latest reply on Mar 27, 2015 by martinover
Hi everyone,

is it possibile to create a UniqueValueRenderer using an array of values?
Something like this:

var info = {
                value: [1778,1779],
                symbol: new esri.symbol.SimpleFillSymbol().setColor(new dojo.Color([256,0,0]))
            };

var renderer = new esri.renderer.UniqueValueRenderer(defaultSymbol, "O");
renderer.infos = [info];


I have a layer with about 3000 polygons and I need to add tree type of symbols (red, yellow and green) based on a value coming from a database.

PS. With ArcGis Dekstop this thing is possibile using the groups in the Unique Value Symbology.


Thanks in advance
Marco

Outcomes