| Package | com.esri.ags.clusterers |
| Class | public class ESRIClusterer |
| Inheritance | ESRIClusterer BaseClusterer flash.events.EventDispatcher |
| Subclasses | GridClusterer, WeightedClusterer |
| Since : | ArcGIS API for Flex 2.0 |
| Property | Defined By | ||
|---|---|---|---|
| clusterWeightFunction : Function
Reference to a function to calculate the weight of a cluster. | ESRIClusterer | ||
| extentExpandFactor : Number
How much to expand the map extent to find all enclosing graphics. | ESRIClusterer | ||
| graphicToMapPointFunction : Function
Reference to a function to convert a graphic geometry to a MapPoint instance. | ESRIClusterer | ||
| minGraphicCount : int
The minimum number of graphic to display in a cluster, before rendering the cluster using the clusterer symbol. | ESRIClusterer | ||
| overallMaxCount : int
The overall maximum number of graphics in a computed cluster. | ESRIClusterer | ||
| overallMaxWeight : Number
The overall maximum weight of a computed cluster. | ESRIClusterer | ||
| overallMinCount : int
The overall minimum number of graphics in a computed cluster. | ESRIClusterer | ||
| overallMinWeight : Number
The overall mininum weight of a computed cluster. | ESRIClusterer | ||
| sizeInPixels : Number
The cluster size in pixels. | ESRIClusterer | ||
| symbol : Symbol
Default symbol for the clustered graphics. | ESRIClusterer | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new ESRIClusterer. | ESRIClusterer | ||
![]() | clusterGraphics(graphicsLayer:GraphicsLayer, graphicCollection:ArrayCollection):Array
This function _has_ to be implemented by subclasses. | BaseClusterer | |
![]() | destroy(graphicsLayer:GraphicsLayer):void
Empty implementation of interface that can be overridden by subclasses. | BaseClusterer | |
![]() | initialize(graphicsLayer:GraphicsLayer):void
Empty implementation of interface that can be overridden by subclasses. | BaseClusterer | |
| Method | Defined By | ||
|---|---|---|---|
createClusterGraphic(cluster:Cluster, arr:Array):void
Create a ClusterGraphic instance given a Cluster instance. | ESRIClusterer | ||
![]() | dispatchEventChange(type:String = null):void
Helper function to dispatch an event. | BaseClusterer | |
| clusterWeightFunction | property |
clusterWeightFunction:Function
Reference to a function to calculate the weight of a cluster.
By default, if no reference was defined, then the weight of the cluster is relative
to the number of graphics in the cluster.
The function should have the following signature:
public function myCalculateClusterWeightFunction(cluster:Cluster):void
This property can be used as the source for data binding.
public function get clusterWeightFunction():Function public function set clusterWeightFunction(value:Function):void| extentExpandFactor | property |
extentExpandFactor:NumberHow much to expand the map extent to find all enclosing graphics.
The default value is 2.0.
This property can be used as the source for data binding.
public function get extentExpandFactor():Number public function set extentExpandFactor(value:Number):void| graphicToMapPointFunction | property |
graphicToMapPointFunction:Function
Reference to a function to convert a graphic geometry to a MapPoint instance.
When this function is invoked, a graphic reference is passed as an argument
and an instance of MapPoint can be returned. If a null is returned, then the graphic is
passed through and is not factored in the clustering algorithm.
The below sample code is the default implementation.
public function convertToMapPoint(graphic:Graphic):MapPoint
{
return graphic.geometry as MapPoint;
}
This property can be used as the source for data binding.
public function get graphicToMapPointFunction():Function public function set graphicToMapPointFunction(value:Function):void| minGraphicCount | property |
minGraphicCount:intThe minimum number of graphic to display in a cluster, before rendering the cluster using the clusterer symbol.
The default value is 1 graphic.
This property can be used as the source for data binding.
public function get minGraphicCount():int public function set minGraphicCount(value:int):void| overallMaxCount | property |
overallMaxCount:intThe overall maximum number of graphics in a computed cluster.
This property can be used as the source for data binding.
public function get overallMaxCount():int public function set overallMaxCount(value:int):void| overallMaxWeight | property |
overallMaxWeight:NumberThe overall maximum weight of a computed cluster.
This property can be used as the source for data binding.
public function get overallMaxWeight():Number public function set overallMaxWeight(value:Number):void| overallMinCount | property |
overallMinCount:intThe overall minimum number of graphics in a computed cluster.
This property can be used as the source for data binding.
public function get overallMinCount():int public function set overallMinCount(value:int):void| overallMinWeight | property |
overallMinWeight:NumberThe overall mininum weight of a computed cluster.
This property can be used as the source for data binding.
public function get overallMinWeight():Number public function set overallMinWeight(value:Number):void| sizeInPixels | property |
sizeInPixels:NumberThe cluster size in pixels.
The default value is 70 pixels.
This property can be used as the source for data binding.
public function get sizeInPixels():Number public function set sizeInPixels(value:Number):void| symbol | property |
symbol:SymbolDefault symbol for the clustered graphics.
public function get symbol():Symbol public function set symbol(value:Symbol):void| ESRIClusterer | () | Constructor |
public function ESRIClusterer()Creates a new ESRIClusterer.
| createClusterGraphic | () | method |
protected function createClusterGraphic(cluster:Cluster, arr:Array):void
Create a ClusterGraphic instance given a Cluster instance.
If the cluster count is less or equal to the minGraphicCount property, then
each graphic in the cluster will be diplayed individually using its symbol.
Otherwise a new GraphicCluster instance is created where the geometry will be the
cluster center value and the attribute will be the cluster instance.
Parameters
cluster:Cluster — The cluster instance.
| |
arr:Array — The output array where to push the graphic.
|