VEShapeLayer.SetClusteringConfiguration(algorithm, options) Method

You are not viewing the latest version of the AJAX control. Bing Maps AJAX V7 is the recommended JavaScript control for Bing Maps. If you need this documentation, it is available in as a CHM or PDF download.

Sets the algorithm for determining which pushpins are clustered as well as how the cluster is displayed.

VEShapeLayer.SetClusteringConfiguration(algorithm, options);


Name Description


The name of the function used to determine which pushpins are clustered. The function must accept a VEShapeLayer Class object and return an array of VEClusterSpecification Class objects. Required.


A VEClusteringOptions Class object specifying how the pushpin cluster is displayed. Optional.

If the VEClusteringOptions.Icon Property is specified, it is used to display clustered icons. If the Icon property is not specified, the default cluster icon is used.

The SetClusteringConfiguration settings are used when the map is panned, zoomed, or shapes are added or removed from the shape layer.

If clustering is configured for the shape layer, then shapes created by importing data into the shape layer using the VEMap.ImportShapeLayerData Method are clustered.

The SetClusteringConfiguration settings are ignored when the map mode is set to VEMapMode.Mode3D.