Clusterer
A class that provides markers clustering functionality.
new constructor
(map, userOptions)
Example:
const clusterer = new mapgl.Clusterer(map, {
radius: 60
});
Parameters
Methods
A class that provides markers clustering functionality.
(map, userOptions)
Example:
const clusterer = new mapgl.Clusterer(map, {
radius: 60
});
()
Destroys the clusterer.
void
(type, data?)
Calls all event listeners with event type type
type
K
Event type
data?
ClustererEventTable[K]
Data transferred to events
this
(clusterId)
Returns the zoom at which the cluster expands into markers.
clusterId
number
Cluster identifier. Can be obtained from cluster mouse events in ClusterTarget
.
any
(input)
Loads markers to clusterer.
input
InputMarker[]
An array of markers.
void
(type, listener)
Removes event listener registered with on
type
K
Event type
listener
(ev: ClustererEventTable[K]) => void
Event handler
this
(type, listener)
Registers event listener
type
K
Event type
listener
(ev: ClustererEventTable[K]) => void
Event handler
this
(type, listener)
Registers event listener which will be called once
type
K
Event type
listener
(ev: ClustererEventTable[K]) => void
Event handler
this
(clusterId)
Resets the cluster style by its ID to to the one set in the options.
clusterId
number
Cluster identifier. The same parameter as in setClusterStyle method.
void
(clusterId, clusterStyle)
Changes the cluster style by its ID
clusterId
number
Cluster identifier. Can be obtained from cluster mouse events in ClusterTarget
.
clusterStyle
(pointsCount: number, target: ClusterTarget) => ClusterStyleClusterStyle
An object or a function that returns style for the cluster.
void