ClusterLayerOptions Object

Bing
 

The following is a list of properties that are available in the ClusterLayerOptions object.

NameTypeDescription
callbackfunction()A callback function that is fired after the clustering for a map view has completed. This is useful if you want to generate a list of locations based on what is in the current view.
clusteredPinCallbackfunction(pin: ClusterPushpin)A callback function that allows you to process a clustered pushpin before it is added to a layer. This is useful if you want to add events or set style options on the clustered pushpin.
clusteringEnabledbooleanIndicates if the layer should cluster the locations or not. Default: true
clusterPlacementTypeClusterPlacementTypeDefines how clusters are positioned on the map. Default: MeanAverage
gridSizenumberThe width and height of the gird cells used for clustering in pixels. Default: 45
layerOffsetPointOffsets the placement of clustered pushpins by a set number of pixels. This option is only available when the placement type is set to GridCenter. This is useful if you have multiple cluster layers on the map and you want to offset the clustered pushpins between the layers so that they are visible, otherwise the clusters from the different layers would overlap completely.
visiblebooleanA boolean indicating if the layer is visible or not.
zIndexnumberThe z-index of the layer. See also: zIndexing in Bing Maps V8
Show: