flutter_map_heatmap 0.0.1 copy "flutter_map_heatmap: ^0.0.1" to clipboard
flutter_map_heatmap: ^0.0.1 copied to clipboard

A heatmap plugin for flutter_map

Flutter Map Heatmap plugin #

A Simple heatmap plugin written for for flutter_map package

example #

A full example can be found under the example project.

Usage #

Add flutter_map and flutter_map_heatmap to your pubspec:

dependencies:
  flutter_map: 0.14.0
  flutter_map_heatmap: any # or the latest version on Pub

Flutter heatmaps is implemented as a tile provider.

Add it in your FlutterMap and configure it using HeatMapOptions.

  Widget build(BuildContext context) {
    return FlutterMap(
      options: new MapOptions(
          center: new LatLng(57.8827, -6.0400),
          zoom: 8.0
      ),
      layers: [
        new TileLayerOptions(
            urlTemplate: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
            subdomains: ['a', 'b', 'c']),
        new TileLayerOptions(
            backgroundColor: Colors.transparent,
            opacity: 1,
            tileSize: 256,
            tileProvider: HeatMapTilesProvider(data,
                heatMapOptions: HeatMapOptions(
                ),
                dataSource: InMemoryHeatMapDataSource(data: data))),
      ],
    );
  }

InMemoryHeatMapDataSource is provided out of the box but its easy to implement your own datasource provider by implementing HeatMapDataSource

TODO #

  • ❌ upgrade to flutter_map
  • ❌ release to pub
  • ❌ complete GriddedHeatMapDataSource for gridding the data
  • ❌ improve heatmaps at lower zoom levels by scaling the radius used during painting.
20
likes
0
pub points
87%
popularity

Publisher

unverified uploader

A heatmap plugin for flutter_map

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_map, latlong2

More

Packages that depend on flutter_map_heatmap