AggregateGeoElement Class

  • AggregateGeoElement
  • class Esri::ArcGISRuntime::AggregateGeoElement

    A GeoElement that represents aggregated geoelement on the map, for example a cluster of features or graphics. More...

    Header: #include <AggregateGeoElement.h>
    Since: Esri::ArcGISRuntime 200.2
    Inherits: Esri::ArcGISRuntime::Object and Esri::ArcGISRuntime::GeoElement

    Public Functions

    virtual ~AggregateGeoElement() override
    QFuture<QList<Esri::ArcGISRuntime::GeoElement *>> geoElementsAsync(QObject *parent = nullptr)
    bool isSelected() const
    void setSelected(bool selected)

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::AttributeListModel *attributes() const override
    virtual Esri::ArcGISRuntime::Geometry geometry() const override
    virtual void setGeometry(const Esri::ArcGISRuntime::Geometry &geometry) override

    Detailed Description

    Based on aggregation properties defined in AggregationFeatureReduction, geoelements are aggregated dynamically as the scale of the map changes. attributes are the summary statistics defined at the time of configuring aggregation on a FeatureLayer. geometry is a GeometryType::Point representing the centroid of the aggregated geoelement. By default, AggregateGeoElement has a cluster_count attribute. Aggregated geoelements only have access to the fields listed in AggregationFeatureReduction::aggregateFields. The fields from the feature layer are not accessible for use in popups, labels, or renderers for aggregated geoelements.

    You can select or unselect aggregate geoelements using the isSelected property. Call geoElementsAsync to get the collection of geoelements represented by the aggregate geoelement.

    Relevant samples:

    • Configure clusters: Add client side feature reduction on a point feature layer that is not pre-configured with clustering.
    • Display clusters: Display a web map with a point feature layer that has feature reduction enabled to aggregate points into clusters.

    See also AggregationFeatureReduction and ClusteringFeatureReduction.

    Member Function Documentation

    [override virtual] AggregateGeoElement::~AggregateGeoElement()

    Destructor.

    [override virtual] Esri::ArcGISRuntime::AttributeListModel *AggregateGeoElement::attributes() const

    Reimplements: GeoElement::attributes() const.

    Returns the attributes of the GeoElement as a collection of name/value pairs.

    [since Esri::ArcGISRuntime 200.4] QFuture<QList<Esri::ArcGISRuntime::GeoElement *>> AggregateGeoElement::geoElementsAsync(QObject *parent = nullptr)

    Gets the collection of geoelements represented by this aggregate geoelement.

    For an aggregate geoelement on a feature layer, this method returns a collection of features. For a graphics overlay, it returns a collection of graphics.

    • parent - The optional parent QObject.

    As a user navigates the map, aggregate geoelements update dynamically depending on the map's scale and extent. When aggregate geoelements are re-created, new aggregate geoelements are drawn. References to AggregateGeoElement instances that are no longer drawn on the map retain their association to the geoelements they aggregated.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.4.

    [override virtual] Esri::ArcGISRuntime::Geometry AggregateGeoElement::geometry() const

    Reimplements: GeoElement::geometry() const.

    Returns the geometry defines the shape and location of the GeoElement.

    See also setGeometry().

    [since Esri::ArcGISRuntime 200.4] bool AggregateGeoElement::isSelected() const

    Returns true if the aggregate geoelement is selected, false otherwise.

    Selecting an AggregateGeoElement adds a temporary visual selection halo around the aggregate geoelement. Selected aggregate geoelements are rendered according to the GeoView::selectionProperties.

    As a user navigates the map, aggregate geoelements update dynamically depending on the map's scale and extent. When aggregate geoelements are re-created, new aggregate geoelements are drawn. This clears selection halos of any previously referenced AggregateGeoElement. However, properties of the previous referenced aggregate geoelements, such as their geometry, attributes, and associated underlying geoelements can still be accessed.

    Note that the selection halo that highlights the an aggregate geoelement is transient. In addition to the map's scale and extent changes, updates to the underlying properties of AggregationFeatureReduction also result in aggregate geoelements being re-created and re-drawn. When this happens, the existing selection halos on the aggregate geoelements are cleared.

    This function was introduced in Esri::ArcGISRuntime 200.4.

    [override virtual] void AggregateGeoElement::setGeometry(const Esri::ArcGISRuntime::Geometry &geometry)

    Reimplements: GeoElement::setGeometry(const Esri::ArcGISRuntime::Geometry &geometry).

    Sets the geometry to geometry.

    See also geometry.

    [since Esri::ArcGISRuntime 200.4] void AggregateGeoElement::setSelected(bool selected)

    Sets the selected to selected.

    This function was introduced in Esri::ArcGISRuntime 200.4.

    See also isSelected.

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