flutter_map_marker_cluster 1.0.2 copy "flutter_map_marker_cluster: ^1.0.2" to clipboard
flutter_map_marker_cluster: ^1.0.2 copied to clipboard

A Dart implementation of Leaflet.makercluster for Flutter apps. Provides beautiful animated marker clustering functionality for flutter_map.

Flutter Map Marker Cluster #

pub package travis

A Dart implementation of Leaflet.markercluster for Flutter apps. This is a plugin for flutter_map package

Usage #

Add flutter_map and flutter_map_marker_cluster to your pubspec:

dependencies:
  flutter_map: any
  flutter_map_marker_cluster: any # or the latest version on Pub

Add it in you FlutterMap and configure it using MarkerClusterGroupLayerOptions.

  Widget build(BuildContext context) {
    return FlutterMap(
      layers: [
        TileLayerOptions(
          urlTemplate: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
          subdomains: ['a', 'b', 'c'],
        ),
        MarkerClusterLayerOptions(
          maxClusterRadius: 120,
          size: Size(40, 40),
          fitBoundsOptions: FitBoundsOptions(
            padding: EdgeInsets.all(50),
          ),
          markers: markers,
          polygonOptions: PolygonOptions(
              borderColor: Colors.blueAccent,
              color: Colors.black12,
              borderStrokeWidth: 3),
          builder: (context, markers) {
            return FloatingActionButton(
              child: Text(markers.length.toString()),
              onPressed: null,
            );
          },
        ),
      ],
    );
  }

Run the example #

See the example/ folder for a working example app.

Supporting Me #

A donation through my Ko-Fi page would be infinitly appriciated: ko-fi

but, if you can't or won't, a star on GitHub and a like on pub.dev would also go a long way!

Every donation gives me fuel to continue my open-source projects and lets me know that I'm doing a good job.

187
likes
0
pub points
98%
popularity

Publisher

unverified uploader

A Dart implementation of Leaflet.makercluster for Flutter apps. Provides beautiful animated marker clustering functionality for flutter_map.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_map, flutter_map_marker_popup, latlong2

More

Packages that depend on flutter_map_marker_cluster