fluster
1.2.0, released 6 years ago by an unverified publisher
A Dart library that clusters geospatial points for map visualizations.
What it does
It groups nearby latitude/longitude points into clusters based on zoom level and radius. You provide a list of objects implementing the Clusterable interface and retrieve clusters, their children, or individual points for a given map viewport.
AI-written summary of version 1.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need client‑side clustering of many markers in a Flutter or Dart map UI
- You want a lightweight, pure‑Dart solution without native dependencies
Skip it when
- You require server‑side clustering or integration with a specific map SDK that provides its own clustering
- You need advanced styling or animation of clusters out of the box
Strengths
- Zero external dependencies
- Supports null safety
- Works on all Flutter platforms
- Simple API
Weaknesses
- No built‑in map widget integration
- Clustering algorithm may be slower for very large datasets compared to native SDKs
- Limited customization of cluster appearance
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
final fluster = Fluster<MapMarker>(
minZoom: 0,
maxZoom: 20,
radius: 150,
extent: 2048,
nodeSize: 64,
points: markers,
createCluster: (cluster, lng, lat) => MapMarker(
markerId: cluster.id.toString(),
latitude: lat,
longitude: lng,
),
);
final clusters = fluster.clusters([-180, -85, 180, 85], currentZoom);Alternatives
Packages that do the same job and could replace fluster.
- flutter_map_marker_popup
Marker popups for flutter_map
84Compare - flutter_map_marker_cluster
A Dart implementation of Leaflet.makercluster for Flutter apps. Provides beautiful animated marker clustering functionality for flutter_map.
69Compare - flutter_animarker
Marker Geo-Animation solution for Google Maps.
50Compare - flutter_map_supercluster
Very fast marker clustering for flutter_map.
46Compare