Rendering FeatureLayer
You can use the renderer
property to define a set of symbols for a FeatureLayer
or a GraphicsLayer
. These symbols can have different colors and/or sizes based on an attribute.
There are many different types of renderers in the ArcGIS Server API for JavaScript. Common ones include SimpleRenderer
, ClassBreaksRenderer
, UniqueValueRenderer
, DotDensityRenderer
, and TemporalRenderer
. We'll examine each of these renderers in this section.
The rendering process will be the same regardless of the type of renderer
you use. You first need to create an instance of the renderer, define the symbology for it, and then finally apply the renderer to the FeatureLayer
. This rendering process is illustrated as follows:

The simplest type of renderer is SimpleRenderer
, which simply applies the same symbol for all graphics. All you need to do is define the symbol, associate it with the renderer, and then apply the renderer to your graphics layer:
var symbol = new SimpleMarkerSymbol(); symbol...