;

FeatureCollection Class

  • FeatureCollection
  • class Esri::ArcGISRuntime::FeatureCollection

    A container for a collection of FeatureCollectionTables. More...

    Header: #include <FeatureCollection>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: Esri::ArcGISRuntime::Object, Esri::ArcGISRuntime::Loadable, and Esri::ArcGISRuntime::JsonSerializable

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

    FeatureCollection(const QList<Esri::ArcGISRuntime::FeatureCollectionTable *> &featureCollectionTables, QObject *parent = nullptr)
    FeatureCollection(Esri::ArcGISRuntime::Item *item, QObject *parent = nullptr)
    FeatureCollection(QObject *parent = nullptr)
    virtual ~FeatureCollection() override
    Esri::ArcGISRuntime::Item *item() const
    QUuid save()
    QUuid saveAs(Esri::ArcGISRuntime::Portal *portal, const QString &title, const QStringList &tags, const Esri::ArcGISRuntime::PortalFolder &folder = PortalFolder(), const QString &description = QString(), const QByteArray &thumbnailBytes = QByteArray())
    Esri::ArcGISRuntime::FeatureCollectionTableListModel *tables() const

    Reimplemented Public Functions

    virtual void cancelLoad() override
    virtual void load() override
    virtual Esri::ArcGISRuntime::Error loadError() const override
    virtual Esri::ArcGISRuntime::LoadStatus loadStatus() const override
    virtual void retryLoad() override
    virtual QString toJson() const override
    virtual QJsonObject unknownJson() const override
    virtual QJsonObject unsupportedJson() const override

    Signals

    void doneLoading(Esri::ArcGISRuntime::Error loadError)
    void loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)
    void saveAsCompleted(QUuid taskId, bool succeeded)
    void saveCompleted(QUuid taskId, bool succeeded)

    Static Public Members

    Esri::ArcGISRuntime::FeatureCollection *fromJson(const QString &json, QObject *parent = nullptr)

    Detailed Description

    Represents a collection of features, usually contained in a web map (by-value) or portal item (by-reference). The features are stored in a FeatureCollection as a collection of FeatureCollectionTables. Use this object to maintain and serialize collections of features to and from JSON, and to save them to and load them from portal items.

    Member Function Documentation

    FeatureCollection::FeatureCollection(const QList<Esri::ArcGISRuntime::FeatureCollectionTable *> &featureCollectionTables, QObject *parent = nullptr)

    Constructor that accepts a list of FeatureCollectionTables (featureCollectionTables) and an optional parent.

    FeatureCollection::FeatureCollection(Esri::ArcGISRuntime::Item *item, QObject *parent = nullptr)

    Constructor that accepts a portal item (item) and an optional parent.

    FeatureCollection::FeatureCollection(QObject *parent = nullptr)

    Default constructor that accepts an optional parent.

    [signal] void FeatureCollection::doneLoading(Esri::ArcGISRuntime::Error loadError)

    Signal emitted when this object is done loading.

    • loadError - Details about any error that may have occurred.

    Note: If there is a load error it will also be emitted on the errorOccurred signal.

    See also Loadable and Object.

    [signal] void FeatureCollection::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Signal emitted when the loadStatus property changes.

    See also Loadable.

    [signal] void FeatureCollection::saveAsCompleted(QUuid taskId, bool succeeded)

    Signal emitted when the saveAs operation is completed.

    • taskId - The task ID for the asynchronous operation.
    • succeeded - Whether the operation was successful.

    [signal] void FeatureCollection::saveCompleted(QUuid taskId, bool succeeded)

    Signal emitted when the save operation is completed.

    • taskId - The task ID for the asynchronous operation.
    • succeeded - Whether the operation was successful.

    [override virtual] FeatureCollection::~FeatureCollection()

    Destructor.

    [override virtual] void FeatureCollection::cancelLoad()

    Reimplements: Loadable::cancelLoad().

    See Loadable.

    [static] Esri::ArcGISRuntime::FeatureCollection *FeatureCollection::fromJson(const QString &json, QObject *parent = nullptr)

    Creates a new FeatureCollection from its JSON representation.

    • json - The JSON text.
    • parent - The parent QObject (optional).

    Esri::ArcGISRuntime::Item *FeatureCollection::item() const

    Gets the item used to create this FeatureCollection.

    [override virtual] void FeatureCollection::load()

    Reimplements: Loadable::load().

    See Loadable.

    [override virtual] Esri::ArcGISRuntime::Error FeatureCollection::loadError() const

    Reimplements: Loadable::loadError() const.

    See Loadable.

    [override virtual] Esri::ArcGISRuntime::LoadStatus FeatureCollection::loadStatus() const

    Reimplements: Loadable::loadStatus() const.

    See Loadable.

    [override virtual] void FeatureCollection::retryLoad()

    Reimplements: Loadable::retryLoad().

    See Loadable.

    QUuid FeatureCollection::save()

    Saves any changes that have been made to the FeatureCollection to the associated PortalItem.

    The FeatureCollection must have been constructed using the PortalItem constructor to associate it with a PortalItem object, or must have been previously saved using saveAs.

    Updates the FeatureCollection content data on the portal and also updates the portal item properties stored on the portal to match those stored within the FeatureCollection's PortalItem object.

    If the portal associated with the item is not loaded, it will be loaded automatically. If the portal requires a credential that has not been supplied, it should be loaded before calling this function.

    The FeatureCollection must be loaded to call this function. Calling this function will not force the FeatureCollection to start loading. If the FeatureCollection is not already associated with a PortalItem, calling save will emit errorOccurred.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    QUuid FeatureCollection::saveAs(Esri::ArcGISRuntime::Portal *portal, const QString &title, const QStringList &tags, const Esri::ArcGISRuntime::PortalFolder &folder = PortalFolder(), const QString &description = QString(), const QByteArray &thumbnailBytes = QByteArray())

    Saves the FeatureCollection to a new PortalItem.

    The FeatureCollection does not need to be associated with an existing PortalItem object. Updates the FeatureCollection content data on the portal, and updates the portal item properties stored on the portal to match those stored within the FeatureCollection's PortalItem object.

    The FeatureCollection must be loaded to call this function. Calling this function will not force the FeatureCollection to start loading.

    Note: If the FeatureCollection was already associated with a PortalItem object (either because the FeatureCollection was created using a PortalItem or was previously saved), that object will be replaced with a new PortalItem, effectively duplicating the FeatureCollection on the portal.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    Esri::ArcGISRuntime::FeatureCollectionTableListModel *FeatureCollection::tables() const

    Returns the list model of tables in this FeatureCollection.

    [override virtual] QString FeatureCollection::toJson() const

    Reimplements: JsonSerializable::toJson() const.

    Returns this FeatureCollection as JSON.

    [override virtual] QJsonObject FeatureCollection::unknownJson() const

    Reimplements: JsonSerializable::unknownJson() const.

    Gets unknown JSON data from the source JSON.

    Unknown JSON data consists of values that are in the source JSON but not parsed by ArcGIS Runtime.

    See also JsonSerializable.

    [override virtual] QJsonObject FeatureCollection::unsupportedJson() const

    Reimplements: JsonSerializable::unsupportedJson() const.

    Gets the unsupported JSON data from the source JSON.

    Unsupported JSON data consists of values that are supported by web maps, but are not exposed through the ArcGIS Runtime API.

    See also JsonSerializable.

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