| Package | com.esri.ags.clusterers |
| Class | public class WeightedClusterer |
| Inheritance | WeightedClusterer ESRIClusterer BaseClusterer flash.events.EventDispatcher |
| Since : | ArcGIS API for Flex 2.0 |
graphicToMapPointFunction function. Each cluster is placed in a cell in a trellis where the cell
width and height is based on the sizeInPixels property. The trellis is used as a spatial index.
Each populated cell in the trellis searches its immediate neighbors and merges the neighbors graphic into it.
This merging process adjusts the cluster center based on its weight and its neighbor's weight.
The process of search and merge repeats until no overlaping clusters exist.
See also
| Property | Defined By | ||
|---|---|---|---|
| center : MapPoint
The clustering algorithm trellis center. | WeightedClusterer | ||
![]() | 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 | |
| graphicWeightFunction : Function
Reference to a function to calculate the weight of a graphic. | WeightedClusterer | ||
![]() | 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 WeightedClusterer instance. | WeightedClusterer | ||
![]() | 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 | |
| center | property |
center:MapPointThe clustering algorithm trellis center. The trellis cells are computed relative to that location. If this property is not defined, then, first time through, it will be set to the map extent center.
This property can be used as the source for data binding.
public function get center():MapPoint public function set center(value:MapPoint):void| graphicWeightFunction | property |
graphicWeightFunction:Function
Reference to a function to calculate the weight of a graphic.
When this function is invoked, a graphic reference is passed as an argument
and a Number is expected to be returned.
public function myGraphicWeight(graphic:Graphics):Number
{
return graphic.attributes.weight;
}
By default, each graphic has a weight of 1.0;
This property can be used as the source for data binding.
public function get graphicWeightFunction():Function public function set graphicWeightFunction(value:Function):void| WeightedClusterer | () | Constructor |
public function WeightedClusterer()Creates a new WeightedClusterer instance.