ArcGIS Developers

SimpleMarkerSymbol Class

class Esri::ArcGISRuntime::SimpleMarkerSymbol

A marker symbol based on simple shapes. More...

Header: #include <SimpleMarkerSymbol>
Since: Esri::ArcGISRuntime 100.0
Inherits: Esri::ArcGISRuntime::MarkerSymbol

This class was introduced in Esri::ArcGISRuntime 100.0.

Public Functions

SimpleMarkerSymbol(Esri::ArcGISRuntime::SimpleMarkerSymbolStyle style, const QColor &color, float size, QObject *parent = nullptr)
SimpleMarkerSymbol(QObject *parent = nullptr)
virtual ~SimpleMarkerSymbol() override
QColor color() const
Esri::ArcGISRuntime::SimpleLineSymbol *outline() const
void setColor(const QColor &color)
void setOutline(Esri::ArcGISRuntime::SimpleLineSymbol *outline)
void setSize(float size)
void setStyle(Esri::ArcGISRuntime::SimpleMarkerSymbolStyle style)
float size() const
Esri::ArcGISRuntime::SimpleMarkerSymbolStyle style() const
Esri::ArcGISRuntime::MultilayerPointSymbol *toMultilayerSymbol(QObject *parent = nullptr) const

Detailed Description

Symbols describe how graphics and features look on a map. Different symbols are used with different geometry types. Instances of this class represent simple marker symbols. Marker symbols are used to display those graphics and features which are based on point or multipoint geometry. Simple marker symbols display simple, predefined markers such as circle, cross, and so on. In addition, the markers can have an optional outline, which is defined by a line symbol.


Create a SimpleMarkerSymbol and set its style, color, and size:

SimpleMarkerSymbol* simpleMarkerSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Circle, QColor(Qt::gray), 34.0, this);

Member Function Documentation

SimpleMarkerSymbol::SimpleMarkerSymbol(Esri::ArcGISRuntime::SimpleMarkerSymbolStyle style, const QColor &color, float size, QObject *parent = nullptr)

Constructs a simple marker symbol providing its style, color, size, and optional parent.

SimpleMarkerSymbol::SimpleMarkerSymbol(QObject *parent = nullptr)

Default constructor with an optional parent.

[override virtual] SimpleMarkerSymbol::~SimpleMarkerSymbol()


QColor SimpleMarkerSymbol::color() const

Returns the color of the symbol.

See also setColor().

Esri::ArcGISRuntime::SimpleLineSymbol *SimpleMarkerSymbol::outline() const

Returns the outline of the symbol.

See also setOutline().

void SimpleMarkerSymbol::setColor(const QColor &color)

Sets the color of the symbol.

See also color().

void SimpleMarkerSymbol::setOutline(Esri::ArcGISRuntime::SimpleLineSymbol *outline)

Sets the outline of the symbol.

See also outline().

void SimpleMarkerSymbol::setSize(float size)

Sets the size of the symbol in device independent pixels (DIPs).

See also size().

void SimpleMarkerSymbol::setStyle(Esri::ArcGISRuntime::SimpleMarkerSymbolStyle style)

Sets the marker symbol's style.

See also style().

float SimpleMarkerSymbol::size() const

Returns the size of the symbol in device independent pixels (DIPs).

See also setSize().

Esri::ArcGISRuntime::SimpleMarkerSymbolStyle SimpleMarkerSymbol::style() const

Returns the marker symbol's style.

See also setStyle().

Esri::ArcGISRuntime::MultilayerPointSymbol *SimpleMarkerSymbol::toMultilayerSymbol(QObject *parent = nullptr) const

Returns Multilayer point symbol generated from simple marker symbol with optional parent.

This helper method allows users to generate a MultilayerPointSymbol with VectorMarkerSymbolLayer containing polygon with defined geometry for different shapes.

The resulting MultilayerPointSymbol contains a single VectorMarkerSymbolLayer that has a VectorMarkerSymbolElement with a polygon representation of the marker geometry.

Note: if no parent is specified, this SimpleMarkerSymbol will be the parent of the MultilayerPointSymbol.

This function was introduced in Esri::ArcGISRuntime 100.5.

Feedback on this topic?