Skip To Content ArcGIS for Developers Sign In Dashboard

SubtypeFeatureLayer Class

(Esri::ArcGISRuntime::SubtypeFeatureLayer)

A layer that can visualize feature data with different visibility, rendering, popup properties, and so on for some or all of the FeatureSubtype in an ArcGISFeatureTable. The ArcGISFeatureTable must have a ArcGISFeatureLayerInfo::subtypeField defined, and at least one FeatureSubtype defined, otherwise the layer will fail to load. More...

Header: #include <SubtypeFeatureLayer>
Since: Esri::ArcGISRuntime 100.7
Inherits: FeatureLayer

Public Functions

SubtypeFeatureLayer(ArcGISFeatureTable *featureTable, QObject *parent = nullptr)
~SubtypeFeatureLayer()
SubtypeSublayer *sublayerWithSubtypeCode(const QVariant &code, QObject *parent = nullptr) const
SubtypeSublayer *sublayerWithSubtypeName(const QString &name, QObject *parent = nullptr) const
SubtypeSublayerListModel *subtypeSublayers() const

Additional Inherited Members

Detailed Description

A layer that can visualize feature data with different visibility, rendering, popup properties, and so on for some or all of the FeatureSubtype in an ArcGISFeatureTable. The ArcGISFeatureTable must have a ArcGISFeatureLayerInfo::subtypeField defined, and at least one FeatureSubtype defined, otherwise the layer will fail to load.

See also FeatureLayer.

Member Function Documentation

SubtypeFeatureLayer::SubtypeFeatureLayer(ArcGISFeatureTable *featureTable, QObject *parent = nullptr)

Creates a new subtype feature layer object.

If are there no ArcGISFeatureTable::featureSubtypes objects defined on the ArcGISFeatureTable, the layer will fail to load.

  • featureTable - The feature table used as the source of the subtype feature layer.
  • parent - an optional parent QObject.

SubtypeFeatureLayer::~SubtypeFeatureLayer()

Destructor.

SubtypeSublayer *SubtypeFeatureLayer::sublayerWithSubtypeCode(const QVariant &code, QObject *parent = nullptr) const

Finds a SubtypeSublayer for a feature subtype based on the FeatureSubtype::code.

When working with a particular ArcGISFeature, the FeatureSubtype::code is the value of the ArcGISFeatureLayerInfo::subtypeField field. The corresponding SubtypeSublayer can be found using the value of that field. Returns the SubtypeSublayer of the subtype code.

  • code - The subtype code of the sublayer to retrieve.
  • parent - An optional parent.

If parent is nullptr, then this object will be the parent.

See also Returned QObjects Parenting.

SubtypeSublayer *SubtypeFeatureLayer::sublayerWithSubtypeName(const QString &name, QObject *parent = nullptr) const

Finds a SubtypeSublayer for a feature subtype based on the subtype name.

  • name - The subtype name of the sublayer to retrieve.
  • parent - An optional parent.

If parent is nullptr, then this object will be the parent.

See also Returned QObjects Parenting.

SubtypeSublayerListModel *SubtypeFeatureLayer::subtypeSublayers() const

Returns the list model of SubtypeSublayer in the SubtypeFeatureLayer.

The objects in this collection are the same objects in LayerContent::subLayerContents. The difference between the two collections is this collection is modifiable so the layer order is configurable.


Feedback on this topic?