Point Based Clustering

Author: Ricky Brundritt

Category: Layout

Module Size: 15 kb (minified 4 kb)

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. This is similat yo Client Side Clustering module that already exists but uses a different type of algorithm for grouping clusters. The algorithm used by this module prevents pushpins from overlapping and only clusters the data when the zoom level changes. Addiitonally this module keeps track of clustered information for each zoom level making the algorithm faster the more you use it. This module is recommended for clustering 2000 pushpins or less in the browser. If you need to support 2000 - 5000 pushpins then look at the other Client side Clustering 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:

clip_image002

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:

 

Last edited Feb 8 at 9:43 PM by rbrundritt, version 9

Comments

No comments yet.