flutter_map_supercluster
4.3.0, released 3 years ago by balanci.ng
Very fast marker clustering for flutter_map.
What it does
Provides marker clustering layers for flutter_map to efficiently display large numbers of markers. It offers both immutable and mutable clustering layers depending on whether markers need to be added or removed dynamically.
AI-written summary of version 4.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are using flutter_map and experiencing performance issues with many markers.
- You want to cluster markers efficiently without heavy animations.
Skip it when
- You require built-in beautiful clustering animations out of the box.
- You are not using flutter_map.
Strengths
- Extremely fast marker clustering performance.
- Supports both mutable and immutable marker layers.
Weaknesses
- Does not include built-in clustering animations.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 7
Widget build(BuildContext context) {
return FlutterMap(
options: MapOptions(
zoom: 5,
maxZoom: 15,
),
children: <Widget>[
TileLayer(
options: TileLayerOptions(
urlTemplate: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
subdomains: ['a', 'b', 'c'],
),
),
SuperclusterLayer.immutable(
initialMarkers: markers,
clusterWidgetSize: const Size(40, 40),
builder: (context, markerCount, extraClusterData) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.0),
color: Colors.blue,
),
child: Center(
child: Text(
markerCount.toString(),
style: const TextStyle(color: Colors.white),
),
),
);
},
),
],
);
}Alternatives
Packages that do the same job and could replace flutter_map_supercluster.
- google_maps_flutter_web
Web platform implementation of google_maps_flutter.
88Compare - google_maps_flutter_android
Android implementation of the google_maps_flutter plugin.
82Compare - google_maps_flutter_ios
iOS implementation of the google_maps_flutter plugin.
81Compare - flutter_map_animations
Animation utilities for markers and controls of the flutter_map package.
86Compare
Works with
Packages commonly used together with flutter_map_supercluster: ones it builds on, ones built on it, and its own family.
- asyncflutter_map_supercluster depends on itUtility classes and helpers that extend Dart's async library.
- equatableflutter_map_supercluster depends on itProvides value‑based equality for Dart objects without manual == and hashCode.
- latlong2flutter_map_supercluster depends on itLightweight Dart library for latitude/longitude calculations.
- flutter_mapflutter_map_supercluster depends on itPure‑Flutter map client with tile loading, markers, and gestures
- providerflutter_map_supercluster depends on itA lightweight wrapper around InheritedWidget for state management
- flutter_map_marker_popupflutter_map_supercluster depends on itMarker popups for flutter_map
- superclusterflutter_map_supercluster depends on itFast point clustering library for maps supporting immutable and mutable indices.