Skip to content
Advertisement

Google Maps clustering if markers greater than 5

I’m trying to add clusters into google map and below code works charm, but I need to add clusters if there are more than 5 markers at same place. How would I do that with MarkerClusterer?

JavaScript

Advertisement

Answer

From the MarkerClustererPlus documentation

minimumClusterSize number

The minimum number of markers needed in a cluster before the markers are hidden and a cluster marker appears. The default value is 2.

To set it to 5:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement