Class AggregateGeoElement
- All Implemented Interfaces:
GeoElement
GeoElement
that represents aggregated geoelement on the map, for example a
cluster of features or graphics.
Based on aggregation properties defined in AggregationFeatureReduction
, geoelements are aggregated
dynamically as the scale of the map changes.
The attributes
are the summary statistics defined at the time of configuring
aggregation on a FeatureLayer
.
The 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.getAggregateFields()
. 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 selectedProperty()
property.
Call geoElementsAsync()
to get the collection of geoelements represented by the aggregate geoelement.
- Since:
- 200.2.0
- See Also:
-
Property Summary
TypePropertyDescriptionTrue if the aggregate geoelement is selected, false otherwise. -
Method Summary
Modifier and TypeMethodDescriptioncomputeCalloutLocation
(Point tapLocation, MapView mapView) Gets the collection of geoelements represented by this aggregate geoelement.Gets the attributes of the GeoElement as a collection of name/value pairs.Gets the geometry which defines the shape and location of the GeoElement.boolean
Gets the value of theselected
property.True if the aggregate geoelement is selected, false otherwise.void
setGeometry
(Geometry geometry) Sets the geometry defines the shape and location of the GeoElement.void
setSelected
(boolean isSelected) Sets the value of theselected
property.
-
Property Details
-
selected
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.selectionPropertiesProperty()
.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 an aggregate geoelement is transient. In addition to the map's scale and extent changes, changes to underlying properties of
AggregationFeatureReduction
also result in aggregate geoelements being re-created and re-drawn. When this happens, the existing selection halos on aggregate geoelements are cleared.- Since:
- 200.4.0
- See Also:
-
-
Method Details
-
selectedProperty
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.selectionPropertiesProperty()
.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 an aggregate geoelement is transient. In addition to the map's scale and extent changes, changes to underlying properties of
AggregationFeatureReduction
also result in aggregate geoelements being re-created and re-drawn. When this happens, the existing selection halos on aggregate geoelements are cleared.- Returns:
- the
selected
property - Since:
- 200.4.0
- See Also:
-
isSelected
public boolean isSelected()Gets the value of theselected
property.- Property description:
- 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.selectionPropertiesProperty()
.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 an aggregate geoelement is transient. In addition to the map's scale and extent changes, changes to underlying properties of
AggregationFeatureReduction
also result in aggregate geoelements being re-created and re-drawn. When this happens, the existing selection halos on aggregate geoelements are cleared. - Returns:
- the value of the
selected
property - Since:
- 200.4.0
- See Also:
-
setSelected
public void setSelected(boolean isSelected) Sets the value of theselected
property.- Property description:
- 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.selectionPropertiesProperty()
.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 an aggregate geoelement is transient. In addition to the map's scale and extent changes, changes to underlying properties of
AggregationFeatureReduction
also result in aggregate geoelements being re-created and re-drawn. When this happens, the existing selection halos on aggregate geoelements are cleared. - Parameters:
isSelected
- the value for theselected
property- Since:
- 200.4.0
- See Also:
-
geoElementsAsync
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.
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.
- Returns:
- a
ListenableFuture
that returns anObservableList
containingGeoElement
types - Since:
- 200.4.0
-
getAttributes
Description copied from interface:GeoElement
Gets the attributes of the GeoElement as a collection of name/value pairs.Attribute values are returned as Object instances, but the underlying value type is based on the
Field.Type
.- Specified by:
getAttributes
in interfaceGeoElement
- Returns:
- the attributes of the GeoElement as a collection of name/value pairs
-
getGeometry
Description copied from interface:GeoElement
Gets the geometry which defines the shape and location of the GeoElement.- Specified by:
getGeometry
in interfaceGeoElement
- Returns:
- the geometry defines the shape and location of the GeoElement, or null if none
-
setGeometry
Description copied from interface:GeoElement
Sets the geometry defines the shape and location of the GeoElement.- Specified by:
setGeometry
in interfaceGeoElement
- Parameters:
geometry
- the geometry defines the shape and location of the GeoElement
-
computeCalloutLocation
- Specified by:
computeCalloutLocation
in interfaceGeoElement
- Parameters:
tapLocation
- location used to compute the callout location, can be nullmapView
- if specified and if a marker symbol is displayed for this GeoElement, the leader offset of the marker symbol will be used in this computation; can be null- Returns:
- the computed location to place the callout
- if tapLocation is null, computed location will be based on geometry alone
- if tapLocation is not-null and inside geometry, then the computed location is same as the tapLocation
- if tapLocation is not-null and outside geometry, then the computed location is the nearest point on the geometry from the tapLocation
-