A very fast JavaScript library for geospatial point clustering for browsers and Node.js.
Supercluster is a JavaScript library that performs fast geospatial point clustering, grouping large numbers of map markers into clusters based on zoom level and geographic proximity. It solves the problem of rendering millions of points on interactive maps by dynamically aggregating them, improving performance and user experience. Originally built to power clustering in Mapbox GL JS, it is now a standalone library for any mapping application.
Developers building interactive web or Node.js mapping applications that need to visualize large datasets of geographic points, such as those using Leaflet, Mapbox GL JS, or other mapping libraries.
Developers choose Supercluster for its exceptional speed in processing millions of points, its lightweight and dependency-free design, and its proven reliability from powering Mapbox's own clustering features. It offers a simple yet powerful API with customizable clustering logic.
A very fast geospatial point clustering library for browsers and Node.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses a KD-tree data structure to cluster millions of points in real-time, as shown in the demo with 6 million points in Leaflet, ensuring smooth map interactions.
Works seamlessly in both browser environments and Node.js, with support for ES modules, script tags, and various import methods, making it adaptable to different setups.
Provides methods like getClusters, getTile, getChildren, and getLeaves for retrieving clustered data, generating tiles, and handling pagination, catering to diverse mapping needs.
Offers configurable options such as radius, zoom ranges, and property aggregation via map/reduce functions, allowing tailored clustering behavior for specific use cases.
Once points are loaded with load(), the index cannot be updated, requiring a full reload for any data changes, which is inefficient for dynamic or streaming datasets.
Only supports GeoJSON Point features, making it unsuitable for clustering lines, polygons, or other complex geospatial data without preprocessing.
The map/reduce functions for custom properties require careful implementation to avoid mutations and ensure correct aggregation, as noted in the README's strict conditions.