Client Side Clustering
Author: InKnowledge
Category: Layout
Module Size: 15 kb (minified 5 kb)
Original Source:
Bing Maps V7 – Modular design and Client Side Clustering
Dependencies: none
Description:
This module allows you to easily add in client side clustering to your application. Client Side Clustering is a method where pushpins that are close together are grouped and represented as a single pushpin, often using a different
icon to indicate the cluster. This is a great way to improve both the user experience and the performance of the map. To make things easier several features have been added to give you full control of the clustering control without having to modify the code
for the module.
What is Client Side Clustering?
Often we want to load a lot of data on the map, for example if you were a real estate company you would likely want to load up all the properties that matched a user’s search. This could potentially be a couple hundred, if not
thousands of results. If you are zoomed in close to the map it will be pretty easy to identify each location on the map, but if you zoom out the pushpins will likely overlap and the map will become cluttered. Here is an example of 1000 pushpins that are unclustered:

Clustering is the process of grouping closely positioned locations together and representing them with a single pushpin. When you zoom in those locations will become further apart and will separate into their own pushpins. The client
side part of “Client Side Clustering” is clustering the data on the fly in JavaScript rather than going back to the server to request more data. When you have a few thousand or less location to display on the map client side clustering can be significantly
faster than server side clustering and also cuts down on request to your server thus making your application more scalable. Here is an example of the same 1000 pushpins from before being clustered:

Download:

BMv7.ClientSideClustering.zip