Module: ol/source/Cluster

ol/source/Cluster


Classes

Cluster

Type Definitions

Options{Object}

Properties:
Name Type Argument Default Description
attributions module:ol/source/Source~AttributionLike <optional>

Attributions.

distance number <optional>
20

Minimum distance in pixels between clusters.

geometryFunction function <optional>

Function that takes an module:ol/Feature as argument and returns an module:ol/geom/Point as cluster calculation point for the feature. When a feature should not be considered for clustering, the function should return null. The default, which works when the underyling source contains point features only, is

function(feature) {
  return feature.getGeometry();
}

See module:ol/geom/Polygon~Polygon#getInteriorPoint for a way to get a cluster calculation point for polygons.

source module:ol/source/Vector~VectorSource

Source.

wrapX boolean <optional>
true

Whether to wrap the world horizontally.