Flutter Map Heatmap plugin

A Simple heatmap plugin written for for flutter_map package.


A full example can be found under the example project.


Add flutter_map and flutter_map_heatmap to your pubspec:

  flutter_map: 4.0.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),
      children: [
            urlTemplate: "https://{s}{z}/{x}/{y}.png",
            subdomains: ['a', 'b', 'c']),
        if (data.isNotEmpty) HeatMapLayer(
          heatMapDataSource: InMemoryHeatMapDataSource(data: data),
          heatMapOptions: HeatMapOptions(gradient: this.gradients[this.index],
          minOpacity: 0.1),

See the full example

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


  • complete GriddedHeatMapDataSource for gridding the data
  • improve heatmaps at lower zoom levels by scaling the radius used during painting.