ui-leaflet icon indicating copy to clipboard operation
ui-leaflet copied to clipboard

Marker Clustering - How to change the clustering tolerance

Open hyungouk opened this issue 9 years ago • 1 comments

I am currently using angular ui-leaflet to deploy markers with marker clustering similar to http://angular-ui.github.io/ui-leaflet/examples/0000-viewer.html#/markers/clustering-without-overlays-example

I wonder if there is anyway to change the clustering distance tolerance. for example, on zoom level 13, two markers are about 4 blocks away on the map. then when the zoom level becomes 12, the two markers get clustered. But, I would like to reduce the cluster starting distance so that they still remains as separate markers on the map, then get clustered on zoom level 11.

hyungouk avatar Jan 27 '17 15:01 hyungouk

maxClusterRadius allows you to "use a function that accepts the current map zoom and returns the maximum cluster radius in pixels." This allows you to customize the cluster radius at each zoom level.

BAByrne avatar Feb 16 '17 14:02 BAByrne