A feature type defines the domains and feature templates that are used to create a new feature. More...
Header: | #include <FeatureType.h> |
Since: | Esri::ArcGISRuntime 100.0 |
Public Functions
FeatureType() | |
FeatureType(const Esri::ArcGISRuntime::FeatureType &other) | |
FeatureType(Esri::ArcGISRuntime::FeatureType &&other) | |
~FeatureType() | |
QMap<QString, Esri::ArcGISRuntime::Domain> | domains() const |
bool | isEmpty() const |
QString | name() const |
QList<Esri::ArcGISRuntime::FeatureTemplate> | templates() const |
QVariant | typeId() const |
Esri::ArcGISRuntime::FeatureType & | operator=(const Esri::ArcGISRuntime::FeatureType &other) |
Esri::ArcGISRuntime::FeatureType & | operator=(Esri::ArcGISRuntime::FeatureType &&other) |
Detailed Description
A feature type is used to ensure that appropriate attribute values are captured when a new feature is created. A FeatureType can specify the domains for the attribute values and can provide a template that populates the feature with initial values. For example, a roads layer may contain different types of roads, such as main roads, city streets, and unpaved tracks. The owner could set up a feature type named 'main road' to ensure that new features are only populated with attribute values appropriate for a 'main road', and so on.
The owner of the ArcGIS Feature Service defines the feature types when they publish the service. They are held within the "Types" tag of the ArcGIS feature service's REST Services Directory. Each type has an ID, a name, a set of domains and a set of templates. You can obtain the collection of feature types by using ArcGISFeatureTable::featureTypes. Use ArcGISFeatureTable::createFeature(const Esri::ArcGISRuntime::FeatureType&, QObject*) to create a feature with the feature type.
If you are building an editing application, you can present users with a list of feature types. Upon choosing a feature type, the app can populate the feature's attribute values with the FeatureTemplate::prototypeAttributes and ensure that any attributes in the user interface correspond to the domains.
Member Function Documentation
FeatureType::FeatureType ()
Default constructor. Creates an empty FeatureType.
FeatureType::FeatureType (const Esri::ArcGISRuntime::FeatureType &other)
Copy constructor from other FeatureType.
FeatureType::FeatureType (Esri::ArcGISRuntime::FeatureType &&other)
Move constructor from other FeatureType.
FeatureType::~FeatureType ()
Destructor.
QMap<QString, Esri::ArcGISRuntime::Domain > FeatureType::domains() const
Returns the domains describing permissible attribute values for features of this type.
The map contains key-value pairs of field name and a corresponding Domain object for this type.
bool FeatureType::isEmpty () const
Returns true
if this FeatureType is empty.
QString FeatureType::name() const
Returns the name of this type.
QList<Esri::ArcGISRuntime::FeatureTemplate > FeatureType::templates() const
Returns templates that can be used for creating new features of this type.
QVariant FeatureType::typeId () const
Returns the ID of this type.
Esri::ArcGISRuntime::FeatureType &FeatureType::operator=(const Esri::ArcGISRuntime::FeatureType &other)
Assignment operator from other FeatureType.
Esri::ArcGISRuntime::FeatureType &FeatureType::operator=(Esri::ArcGISRuntime::FeatureType &&other)
Move operator from other FeatureType.