Skip to content

v1.2.0 - Marker Clustering

Choose a tag to compare

@voyera voyera released this 25 Mar 16:49
· 2 commits to main since this release
3cd1a8a

What's New

Marker Clustering

Nearby store markers are now automatically grouped into clusters when the map is zoomed out, providing a much cleaner view when displaying many stores at once. Clicking a cluster zooms into the individual markers within it.

  • Clusters display the count of stores they contain
  • Three visual tiers (small, medium, large) based on cluster size
  • Smooth hover animation and zoom-to-bounds on click
  • Spiderfy at max zoom to spread overlapping markers
  • Fully theme-aware -- cluster icons adapt to light/dark mode

New Options

Option Type Default Description
clustering boolean true Enable/disable marker clustering
clusterRadius number 50 Pixel radius for grouping markers
disableClusteringAtZoom number 15 Zoom level where individual markers always show
spiderfyOnMaxZoom boolean true Spread overlapping markers in a spiral at max zoom

Details

  • Clustering is enabled by default -- no code changes needed for existing integrations
  • Set clustering: false to revert to the previous individual-marker behavior
  • Powered by Leaflet.markercluster v1.5.3, loaded automatically from CDN