A simple renderer uses a single Symbol to draw all features and graphics. More...
Header: | #include <SimpleRenderer.h> |
Since: | Esri::ArcGISRuntime 100.0 |
Inherits: | Esri::ArcGISRuntime::Renderer |
Public Functions
SimpleRenderer(QObject *parent = nullptr) | |
SimpleRenderer(Esri::ArcGISRuntime::Symbol *symbol, QObject *parent = nullptr) | |
virtual | ~SimpleRenderer() override |
QString | description() const |
QString | label() const |
void | setDescription(const QString &description) |
void | setLabel(const QString &label) |
void | setSymbol(Esri::ArcGISRuntime::Symbol *symbol) |
Esri::ArcGISRuntime::Symbol * | symbol() const |
Detailed Description
The same symbol is used for all graphics in a graphics overlay and all features in a feature layer, regardless of their attribute values.
Example:
Apply a SimpleRenderer to a GraphicsOverlay:
auto* simpleMarker = new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Circle, QColor(Qt::blue), 16.0, this); auto* simpleRenderer = new SimpleRenderer(simpleMarker, this); auto* graphicsOverlay = new GraphicsOverlay(this); graphicsOverlay->setRenderer(simpleRenderer);
Relevant samples:
- Add graphics with renderer: A renderer allows you to change the style of all graphics in a graphics overlay by referencing a single symbol style.
- Animate 3D symbols: Demonstrates how to animate a graphic's position and rotation and follow it using a `OrbitGeoElementCameraController`.
- Extrude graphics: Extrude graphics based on an attribute value.
- Feature collection layer: Create a Feature Collection Layer from a Feature Collection Table, and add it to a map.
- Feature layer change renderer: Change the appearance of a feature layer with a renderer.
- Feature layer extrusion: Extrude features based on their attributes.
- Scene properties expressions: Update the orientation of a graphic using expressions based on its attributes.
- Simple renderer: Display common symbols for all graphics in a graphics overlay with a renderer.
- Symbolize a shapefile: Display a shapefile with custom symbology.
- Viewshed (GeoElement): Analyze the viewshed for an object (GeoElement) in a scene.
Member Function Documentation
[explicit]
SimpleRenderer::SimpleRenderer (QObject *parent = nullptr)
Creates a new simple renderer without a Symbol.
- parent - The optional parent QObject.
[explicit]
SimpleRenderer::SimpleRenderer (Esri::ArcGISRuntime::Symbol *symbol, QObject *parent = nullptr)
Creates a new simple renderer with the given symbol.
- symbol - The symbol.
- parent - The optional parent QObject.
[override virtual]
SimpleRenderer::~SimpleRenderer ()
Destructor.
QString SimpleRenderer::description() const
Returns the description for the renderer.
See also setDescription().
QString SimpleRenderer::label() const
Returns the label for the renderer.
See also setLabel().
void SimpleRenderer::setDescription (const QString &description)
Sets the description for the renderer.
See also description().
void SimpleRenderer::setLabel (const QString &label)
Sets the label for the renderer.
See also label().
void SimpleRenderer::setSymbol (Esri::ArcGISRuntime::Symbol *symbol)
Sets the symbol for the renderer.
This symbol will be applied to all graphics or features that are in the layer that this renderer is applied to.
See also symbol().
Esri::ArcGISRuntime::Symbol *SimpleRenderer::symbol() const
Returns the symbol for the renderer.
See also setSymbol.