Specify a graphic's symbol with a renderer.
A renderer allows you to change the style of all graphics in an overlay by only changing one copy of the symbol. A renderer will only effect graphics that do not specify their own symbol.
To show a Graphic
in a GraphicsOverlay
using a renderer:
- Create a
GraphicsOverlay
and add it to theMapView
- Create a
Graphic
, specifying only its geometry - Create a single
Symbol
such as aSimpleMarkerSymbol
- Create a renderer with the symbol such as
new SimpleRenderer(symbol)
- Set the renderer on the graphics overlay with
graphicsOverlay.setRenderer(renderer)
- ArcGISMap
- Graphic
- GraphicsOverlay
- MapView
- Point
- SimpleFillSymbol
- SimpleLineSymbol
- SimpleMarkerSymbol
- SimpleRenderer