Rendering a feature layer

A renderer can be used to define a set of symbols for a feature layer or a graphics layer. These symbols can have different colors and/or sizes that are based on an attribute. The five types of renderer in the ArcGIS Server API for JavaScript 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 the renderer, and finally apply the renderer to the feature layer. This rendering process has been illustrated in the following diagram:

The following code example ...

Get Building Web and Mobile ArcGIS Server Applications with JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.