A point symbol built with multiple layers of symbols to display graphics and features that have point or multipoint geometry. More...
Header: | #include <MultilayerPointSymbol.h> |
Since: | Esri::ArcGISRuntime 100.2 |
Inherits: | Esri::ArcGISRuntime::MultilayerSymbol |
Public Functions
MultilayerPointSymbol(const QList<Esri::ArcGISRuntime::SymbolLayer *> &symbolLayers, QObject *parent = nullptr) | |
MultilayerPointSymbol(const QList<Esri::ArcGISRuntime::SymbolLayer *> &symbolLayers, Esri::ArcGISRuntime::SymbolReferenceProperties *referenceProperties, QObject *parent = nullptr) | |
virtual | ~MultilayerPointSymbol() override |
float | angle() const |
Esri::ArcGISRuntime::SymbolAngleAlignment | angleAlignment() const |
void | setAngle(float angle) |
void | setAngleAlignment(Esri::ArcGISRuntime::SymbolAngleAlignment angleAlignment) |
void | setSize(float size) |
float | size() const |
Detailed Description
A MultilayerPointSymbol can contain multiple symbol layers that are combined to create different appearances, for example, concentric circles or a pushpin with a star drawn in a different color. You can access and modify the symbology of layers using MultilayerSymbol::symbolLayers. You can also change properties such as the size, angle, and angleAlignment. For more information about multilayer symbols, refer to Symbol layers.
If you create a MultilayerPointSymbol from a collection of SymbolLayer objects, the first symbol layer in the collection will be drawn first, with the second symbol layer on top of the first, and so on. Note that symbol layers in a multilayer symbol are in reverse order of how they appear in the JSON representation.
// in this multilayer symbol pseudocode json, the 'symbolLayers' ordered list of symbol // layers contains a solid stroke symbol layer followed by a solid fill symbol layer. { "symbolLayers": [{"type": "CIMSolidStroke", "color": "black"},{"type": "CIMSolidFill", "color": "red"}],"type": "CIMPointSymbol" } // this is the solid fill symbol layer, the reverse order from the json representation auto* symbolLayerIndexZero = multilayerSymbol->symboLayers()->at(0); // red fill in the image below // this is the solid stroke symbol layer, the reverse order from the json representation auto* symbolLayerIndexOne = multilayerSymbol->symboLayers()->at(1); // black outline in the image below
Multilayer symbol consisting of two layers.
Relevant samples:
- Read symbols from a mobile style: Combine multiple symbols from a mobile style file into a single symbol.
See also Symbol.
Member Function Documentation
[explicit, since Esri::ArcGISRuntime 100.5]
MultilayerPointSymbol::MultilayerPointSymbol (const QList<Esri::ArcGISRuntime::SymbolLayer *> &symbolLayers , QObject *parent = nullptr)
Creates a multilayer point symbol object with symbol layers.
- symbolLayers - A list of symbol layers that make up the symbol.
- parent - The optional parent QObject.
This function was introduced in Esri::ArcGISRuntime 100.5.
[since Esri::ArcGISRuntime 100.13]
MultilayerPointSymbol::MultilayerPointSymbol (const QList<Esri::ArcGISRuntime::SymbolLayer *> &symbolLayers , Esri::ArcGISRuntime::SymbolReferenceProperties *referenceProperties , QObject *parent = nullptr)
brief Creates a multilayer point symbol object with symbol layers and SymbolReferenceProperties.
- symbolLayers - A list of symbol layers that make up the symbol.
- referenceProperties - The symbol reference properties for the symbol.
- parent - The optional parent QObject.
This function was introduced in Esri::ArcGISRuntime 100.13.
[override virtual]
MultilayerPointSymbol::~MultilayerPointSymbol ()
Destructor.
float MultilayerPointSymbol::angle() const
Returns the angle in degrees.
The angle for multilayer point symbols is measured in degrees counterclockwise from the east, from 0 to 360. The angle for a multilayer point symbol defaults to 0. Marker symbol layers can have a separate heading value defined (which is also 0 by default). Setting a heading for a marker symbol layer does not affect the angle of the point symbol. When an angle value is set for the point symbol, however, that value is applied cumulatively to all the marker symbol layers it contains. The heading for individual symbol layers must be re-fetched in order to see the updated value.
See also setAngle.
Esri::ArcGISRuntime::SymbolAngleAlignment MultilayerPointSymbol::angleAlignment () const
Returns whether the multilayer point symbol is rotated relative to the screen or map.
If the value is SymbolAngleAlignment::Map, the multilayer point symbol is rotated relative to the map and will be affected by the map's rotation. If the value is SymbolAngleAlignment::Screen, the multilayer point symbol is rotated relative to the user's screen and is unaffected by the map's rotation. This is only applicable for 2D maps and is not supported in 3D scenes.
The default value is SymbolAngleAlignment::Screen.
See also setAngleAlignment().
void MultilayerPointSymbol::setAngle (float angle)
Sets the angle (in degrees) to angle.
Angle for multilayer point symbols is measured in degrees counterclockwise from the east, from 0 to 360. The angle for a multilayer point symbol defaults to 0. Marker symbol layers can have a separate heading value defined (which is also 0 by default). Setting a heading for a marker symbol layer does not affect the angle of the point symbol. When an angle value is set for the point symbol, however, that value is applied cumulatively to all the marker symbol layers it contains. The heading for individual symbol layers must be re-fetched in order to see the updated value.
See also angle().
void MultilayerPointSymbol::setAngleAlignment (Esri::ArcGISRuntime::SymbolAngleAlignment angleAlignment )
Sets the symbol angle alignment of the multi-layer point symbol to angleAlignment.
Note: This property is only applicable for 2D and is not supported in 3D.
See also angleAlignment().
void MultilayerPointSymbol::setSize (float size)
Sets the size in device independent pixels (DIPs) to size.
When getting the size from a multilayer point symbol, the value reported is the largest size of all the symbol layers it contains. The symbol size is updated when its symbol layer sizes change (if there is a new largest layer size). When setting a new size at the point symbol level, the size of the largest symbol layer is given the provided value, and all the smaller layers are sized proportionately. An individual symbol layer can be given a specific size without affecting the other layers.
See also size().
float MultilayerPointSymbol::size() const
Returns the symbol size in DIPs.
When getting the size from a multilayer point symbol, the value reported is the largest size of all the symbol layers it contains. The symbol size is updated when its symbol layer sizes change (if there is a new largest layer size). When setting a new size at the point symbol level, the size of the largest symbol layer is given the provided value, and all the smaller layers are sized proportionately. An individual symbol layer can be given a specific size without affecting the other layers.
See also setSize.