FeatureTemplate Class

ArcGISFeature and suggests a type of drawing tool to sketch the feature's geometry."> FeatureTemplate Class | ArcGISQtCpp
  • FeatureTemplate
  • class Esri::ArcGISRuntime::FeatureTemplate

    A feature template defines the default attribute values for the fields of a newly created ArcGISFeature and suggests a type of drawing tool to sketch the feature's geometry. More...

    Header: #include <FeatureTemplate.h>
    Since: Esri::ArcGISRuntime 100.0

    Public Functions

    FeatureTemplate()
    FeatureTemplate(const Esri::ArcGISRuntime::FeatureTemplate &other)
    FeatureTemplate(Esri::ArcGISRuntime::FeatureTemplate &&other)
    ~FeatureTemplate()
    QString description() const
    Esri::ArcGISRuntime::DrawingTool drawingTool() const
    bool isEmpty() const
    QString name() const
    QVariantMap prototypeAttributes() const
    Esri::ArcGISRuntime::FeatureTemplate &operator=(const Esri::ArcGISRuntime::FeatureTemplate &other)
    Esri::ArcGISRuntime::FeatureTemplate &operator=(Esri::ArcGISRuntime::FeatureTemplate &&other)

    Detailed Description

    The owner of the ArcGIS feature service can define one or more feature templates when they publish the service. These are held within the "Templates" tag of the ArcGIS feature service's REST Services Directory. Each template has a name, description, suggested drawing tool, and a list of attributes with their initial values (called prototype). You can obtain the feature service's collection of feature templates from the ArcGISFeatureTable::featureTemplates. Alternatively, if you are using a FeatureType, you can obtain its templates from FeatureType::templates. Use ArcGISFeatureTable::createFeature(const Esri::ArcGISRuntime::FeatureTemplate&, QObject*) to create a feature with the feature template.

    If you are building an editing application, you can present users with a list of feature templates. Upon choosing a template, the app can create a feature with the attributes populated with their default values and present geometry sketching tools to match the drawingTool.

    Member Function Documentation

    FeatureTemplate::FeatureTemplate()

    Default constructor. Creates an empty FeatureTemplate.

    FeatureTemplate::FeatureTemplate(const Esri::ArcGISRuntime::FeatureTemplate &other)

    Copy constructor from other FeatureTemplate.

    FeatureTemplate::FeatureTemplate(Esri::ArcGISRuntime::FeatureTemplate &&other)

    Move constructor from other FeatureTemplate.

    FeatureTemplate::~FeatureTemplate()

    Destructor.

    QString FeatureTemplate::description() const

    Returns the description of the template.

    Esri::ArcGISRuntime::DrawingTool FeatureTemplate::drawingTool() const

    Returns the type of drawing tool that could be used to draw this feature in an editing application.

    bool FeatureTemplate::isEmpty() const

    Returns true if this FeatureTemplate is empty.

    QString FeatureTemplate::name() const

    Returns the name of the template.

    QVariantMap FeatureTemplate::prototypeAttributes() const

    Returns the default attribute values used when creating a feature.

    Esri::ArcGISRuntime::FeatureTemplate &FeatureTemplate::operator=(const Esri::ArcGISRuntime::FeatureTemplate &other)

    Assignment operator from other FeatureTemplate.

    Esri::ArcGISRuntime::FeatureTemplate &FeatureTemplate::operator=(Esri::ArcGISRuntime::FeatureTemplate &&other)

    Move operator from other FeatureTemplate.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.