flutter_map_marker_cluster 0.2.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 94

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(
      options: new MapOptions(
        plugins: [
          MarkerClusterPlugin(),
        ],
      ),
      layers: [
        TileLayerOptions(
          urlTemplate: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
          subdomains: ['a', 'b', 'c'],
        ),
        MarkerClusterLayerOptions(
          maxClusterRadius: 120,
          height: 40,
          width: 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.

[0.2.0] - 26/06/2019

  • fix positions
  • spiderfyCircleDistanceMultiplier to spiderfyCircleRadius

[0.1.6] - 26/06/2019

  • fix circle spiferfy
  • splitted spiderfyDistanceMultiplier to spiderfyCircleDistanceMultiplier and spiderfySpiralDistanceMultiplier
  • added to gesturedetector behavior opaque
  • spiderfy marker animation starts to cluster point
  • added anchorpos to cluster in example

[0.1.5] - 20/06/2019

  • setState issue fixed ( #4 setState not supported )
  • added example with marker that change position

[0.1.4] - 17/06/2019

  • MarkerClusterGroupPlugin to MarkerClusterPlugin
  • MarkerClusterGroupLayerOptions to MarkerClusterLayerOptions
  • maxZoom and minZoom not required ( #2 MapOptions.minZoom required )
  • refresh when change markers ( #4 setState not supported )
  • fix when spiderfy

[0.1.3] - 07/06/2019

  • flutter_map version 0.5.5+2
  • options added anchorPos
  • removed removeOutsideVisibleBound

[0.1.2] - 07/06/2019

  • added option showPolygon
  • polygon line are all cluster's markers and not cluster's child

[0.1.1] - 06/06/2019

  • polygon under clusters and markers

[0.1.0] - 06/06/2019

  • added some tests and configurated travis ci

[0.0.1] - 06/06/2019

  • inital release

example/README.md

flutter_map_marker_cluster_example #

A new Flutter project.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_map_marker_cluster: ^0.2.3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_map_marker_cluster/flutter_map_marker_cluster.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
87
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
94
Learn more about scoring.

We analyzed this package on Oct 18, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
flutter_map ^0.7.0+2 0.7.3
latlong ^0.6.1 0.6.1
Transitive dependencies
ansicolor 1.0.2
async 2.4.0
cached_network_image 1.1.2+1 2.0.0-rc
charcode 1.1.2
collection 1.14.11 1.14.12
console_log_handler 1.1.6
convert 2.1.1
crypto 2.1.3
flutter_cache_manager 1.1.3
flutter_image 2.0.1 3.0.0
http 0.12.0+2
http_parser 3.1.3
intl 0.16.0
logging 0.11.3+2
matcher 0.12.5
meta 1.1.7
path 1.6.4
path_provider 1.3.1
pedantic 1.8.0+1
platform 2.2.1
positioned_tap_detector 1.0.3
quiver 2.0.5
sky_engine 0.0.99
source_span 1.5.5
sqflite 1.1.7+1
stack_trace 1.9.3
string_scanner 1.0.5
synchronized 2.1.0+1
term_glyph 1.1.0
transparent_image 1.0.0
tuple 1.0.3
typed_data 1.1.6
uuid 2.0.2
validate 1.7.0
vector_math 2.0.8
Dev dependencies
flutter_test