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