Change the style of all graphics in a graphics overlay by referencing a single symbol style.
A renderer allows you to change the style of all graphics in an overlay by only changing one copy of the symbol. For example, a user may wish to display a number of graphics on a map of parkland which represent trees, all sharing a common symbol.
- Create a
GraphicsOverlay
and add it to theMapView
. - Create a
Graphic
, specifying only aGeometry
. - Create a single
Symbol
such as aSimpleMarkerSymbol
. - Create a renderer with the
Symbol
such as newSimpleRenderer(symbol)
. - Set the renderer on the
GraphicsOverlay
withgraphicsOverlay.Renderer = renderer
.
- Geometry
- Graphic
- GraphicsOverlay
- SimpleFillSymbol
- SimpleLineSymbol
- SimpleMarkerSymbol
- SimpleRenderer
A renderer will only effect graphics that do not specify their own symbol style.
To set unique symbols across a number of graphics (e.g. showing graphics of individual landmarks) see "Add graphics with symbols" sample.
GraphicsOverlay, SimpleMarkerSymbol, SimpleRenderer