OpenLayers. Strategy. Cluster

Strategy for vector feature clustering.

Inherits from

Summary
OpenLayers. Strategy. Cluster Strategy for vector feature clustering.
Properties
distance {Integer} Pixel distance between features that should be considered a single cluster.
threshold {Integer} Optional threshold below which original features will be added to the layer instead of clusters.
Constructor
OpenLayers. Strategy. Cluster Create a new clustering strategy.
Functions
activate Activate the strategy.
deactivate Deactivate the strategy.

Properties

distance

{Integer} Pixel distance between features that should be considered a single cluster.  Default is 20 pixels.

threshold

{Integer} Optional threshold below which original features will be added to the layer instead of clusters.  For example, a threshold of 3 would mean that any time there are 2 or fewer features in a cluster, those features will be added directly to the layer instead of a cluster representing those features.  Default is null (which is equivalent to 1 - meaning that clusters may contain just one feature).

Constructor

OpenLayers. Strategy. Cluster

Create a new clustering strategy.

Parameters

options {Object} Optional object whose properties will be set on the instance.

Functions

activate

activate: function()

Activate the strategy.  Register any listeners, do appropriate setup.

Returns

{Boolean} The strategy was successfully activated.

deactivate

deactivate: function()

Deactivate the strategy.  Unregister any listeners, do appropriate tear-down.

Returns

{Boolean} The strategy was successfully deactivated.

activate: function()
Activate the strategy.
deactivate: function()
Deactivate the strategy.
Abstract vector layer strategy class.
Close