finds.dev

Leaflet/Leaflet.markercluster

Marker Clustering plugin for Leaflet

View on GitHub

★ 4,147JavaScriptMITupdated Aug 2024

// the take

A Leaflet plugin that groups nearby markers into clusters, with animated zoom/uncluster transitions and a spiderfy mode for overlapping pins. It's the de facto standard for Leaflet marker clustering — if you're using Leaflet and have more than a few dozen markers, this is what you reach for. Handles up to 50k markers in modern browsers with chunked loading.

The spiderfy behavior for co-located markers is genuinely well-thought-out — it fans markers into a spiral or line so you can click individual ones without zooming to max. The chunked addLayers option prevents the main thread from locking when loading large datasets; the chunkProgress callback lets you wire up a real progress bar. Custom iconCreateFunction gives you full control over cluster appearance without having to fork anything. The sub-plugin ecosystem (FeatureGroup.SubGroup, LayerSupport) fills the gaps around L.Control.Layers compatibility that the core plugin deliberately skips.

Last commit was August 2024 and the repo has 400+ open issues — it's in maintenance mode at best. No TypeScript types in the package itself; you'll pull in @types/leaflet.markercluster separately and hope they stay in sync. The clustering algorithm is a fixed-radius grid bucketing approach, not a proper geographic algorithm like DBSCAN or H3 — this means cluster shapes are viewport-dependent and can feel arbitrary when the user pans slightly. No built-in support for non-point geometries: if your data has lines or polygons, you're on your own or relying on one of the community sub-plugins.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
4,147
Forks
1,000
Language
JavaScript
License
MIT
Last commit
12 Aug 2024

// nearby

If Leaflet.markercluster isn't quite it.

All repos →