This page describes an older version, please see latest API at http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/clusterers/ESRIClusterer.html.
Packagecom.esri.ags.clusterers
Classpublic class ESRIClusterer
InheritanceESRIClusterer Inheritance BaseClusterer Inheritance flash.events.EventDispatcher
Subclasses GridClusterer, WeightedClusterer

Since : ArcGIS API for Flex 2.0

Base clusterer for the GridClusterer and WeightedClusterer.



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined By
  
Creates a new ESRIClusterer.
ESRIClusterer
 Inherited
clusterGraphics(graphicsLayer:GraphicsLayer, graphicCollection:ArrayCollection):Array
This function _has_ to be implemented by subclasses.
BaseClusterer
 Inherited
destroy(graphicsLayer:GraphicsLayer):void
Empty implementation of interface that can be overridden by subclasses.
BaseClusterer
 Inherited
initialize(graphicsLayer:GraphicsLayer):void
Empty implementation of interface that can be overridden by subclasses.
BaseClusterer
Protected Methods
 MethodDefined By
  
createClusterGraphic(cluster:Cluster, arr:Array):void
Create a ClusterGraphic instance given a Cluster instance.
ESRIClusterer
 Inherited
dispatchEventChange(type:String = null):void
Helper function to dispatch an event.
BaseClusterer
Property Detail
clusterWeightFunctionproperty
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.


Implementation
    public function get clusterWeightFunction():Function
    public function set clusterWeightFunction(value:Function):void
extentExpandFactorproperty 
extentExpandFactor:Number

How 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.


Implementation
    public function get extentExpandFactor():Number
    public function set extentExpandFactor(value:Number):void
graphicToMapPointFunctionproperty 
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.


Implementation
    public function get graphicToMapPointFunction():Function
    public function set graphicToMapPointFunction(value:Function):void
minGraphicCountproperty 
minGraphicCount:int

The 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.


Implementation
    public function get minGraphicCount():int
    public function set minGraphicCount(value:int):void
overallMaxCountproperty 
overallMaxCount:int

The overall maximum number of graphics in a computed cluster.

This property can be used as the source for data binding.


Implementation
    public function get overallMaxCount():int
    public function set overallMaxCount(value:int):void
overallMaxWeightproperty 
overallMaxWeight:Number

The overall maximum weight of a computed cluster.

This property can be used as the source for data binding.


Implementation
    public function get overallMaxWeight():Number
    public function set overallMaxWeight(value:Number):void
overallMinCountproperty 
overallMinCount:int

The overall minimum number of graphics in a computed cluster.

This property can be used as the source for data binding.


Implementation
    public function get overallMinCount():int
    public function set overallMinCount(value:int):void
overallMinWeightproperty 
overallMinWeight:Number

The overall mininum weight of a computed cluster.

This property can be used as the source for data binding.


Implementation
    public function get overallMinWeight():Number
    public function set overallMinWeight(value:Number):void
sizeInPixelsproperty 
sizeInPixels:Number

The cluster size in pixels.

The default value is 70 pixels.

This property can be used as the source for data binding.


Implementation
    public function get sizeInPixels():Number
    public function set sizeInPixels(value:Number):void
symbolproperty 
symbol:Symbol

Default symbol for the clustered graphics.


Implementation
    public function get symbol():Symbol
    public function set symbol(value:Symbol):void
Constructor Detail
ESRIClusterer()Constructor
public function ESRIClusterer()

Creates a new ESRIClusterer.

Method Detail
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.