This example displays a map showing geo-tagged clusters of photographs taken from locations around the world. The Wikimedia Commons website was used to provide a source of data of geo-tagged images.

Code

Marker clustering requires the presence of the mapsjs-clustering module of the API. The H.clustering.Provider class is used to load in data points and prepare them for clustering.

Customizing the default look-and-feel of the clusters and noise points is very easy. When instantiating the H.clustering.Provider, a theme object holding two methods - getClusterPresentation() and getNoisePresentation() - is passed as an additional parameter into the constructor. Both theme methods must return an H.map.Object such as a marker or polygon etc. More information can be found in the API Reference.