Skip To Content ArcGIS for Developers Sign In Dashboard

SimpleMarkerSymbol Class

(Esri::ArcGISRuntime::SimpleMarkerSymbol)

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

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

Public Functions

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

Additional Inherited Members

Detailed Description

A marker symbol based on simple shapes.

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.

Example:

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(QObject *parent = nullptr)

Default constructor with an optional parent.

SimpleMarkerSymbol::SimpleMarkerSymbol(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()

Destructor.

QColor SimpleMarkerSymbol::color() const

Returns the color of the symbol.

See also setColor().

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(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(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().

SimpleMarkerSymbolStyle SimpleMarkerSymbol::style() const

Returns the marker symbol's style.

See also setStyle().

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?