ClusterLayer Class

Bing
 

This is the main class that provides the clustering functionality.

ClusterLayer(pushpins: Pushpin[], options?: ClusterLayerOptions)

NameReturn TypeDescription
clear()Clears all the data in the cluster layer.
getDisplayedPushpins()Pushpin[]Gets the pushpins that are in the current map view. If clustering is disabled, all pushpins in the clustering layer are returned.
getOptions()ClusterLayerOptionsGets the current options used by the cluster layer.
getPushpins()Pushpin[]Gets all pushpins that are in the layers.
getClusterPushpinByGridKey(gridKey:number)ClusterPushpin or PushpinGets the pushpin in the specified cluster grid cell which can be either a ClusterPushpin if there are multiple pushpins in a cell or a single Pushpin.
getVisible()booleanReturns a boolean indicating if the cluster layer is visible or not.
setOptions(options: ClusterLayerOptions)Sets the clustering options to use in the layer.
setPushpins(pushpins: Pushpin[])Sets the array of pushpins that are used in the clustering layer.
setVisible(visible: boolean)Sets the visibility of the cluster layer.
NameArgumentsDescription
clickLayerMouseEventArgsOccurs when the mouse is used to click the map or when a touch end event occurs on a pushpin or cluster in the layer.
dblclickLayerMouseEventArgsOccurs when the mouse is used to double click the map or when a touch end event occurs on a pushpin or cluster in the layer.
mousedownLayerMouseEventArgsOccurs when the left mouse button is pressed or a touch start event occurs on a pushpin or cluster in the layer.
mouseoverLayerMouseEventArgsOccurs when the mouse cursor moves over top of the area covered by a pushpin or cluster in the layer.
mouseoutLayerMouseEventArgsOccurs when the mouse cursor moves out of the area covered by a pushpin or cluster in the layer.
mouseupLayerMouseEventArgsOccurs when the left mouse button is lifted up or when the touch end event occurs on a pushpin or cluster in the layer.
rightclickLayerMouseEventArgsOccurs when the right mouse button is used to click the map or when a long touch press occurs on a pushpin or cluster in the layer.
Show: