Classes
Type Definitions
-
Options{Object}
-
Properties:
Name Type Description attributionsAttributionLike | undefined Attributions.
distancenumber
(defaults to 20)Distance in pixels within which features will be clustered together.
minDistancenumber
(defaults to 0)Minimum distance in pixels between clusters. Will be capped at the configured distance. By default no minimum distance is guaranteed. This config can be used to avoid overlapping icons. As a tradoff, the cluster feature's position will no longer be the center of all its features.
geometryFunctionfunction | undefined Function that takes a
Featureas argument and returns aPointas cluster calculation point for the feature. When a feature should not be considered for clustering, the function should returnnull. The default, which works when the underlying source contains point features only, isfunction(feature) { return feature.getGeometry(); }See
getInteriorPointfor a way to get a cluster calculation point for polygons.createClusterfunction | undefined Function that takes the cluster's center
Pointand an array ofFeatureincluded in this cluster. Must return aFeaturethat will be used to render. Default implementation is:function(point, features) { return new Feature({ geometry: point, features: features }); }sourceVectorSource<FeatureType>
(defaults to null)Source.
wrapXboolean
(defaults to true)Whether to wrap the world horizontally.