Skip to content

Commit

Permalink
Merge pull request #11 from leewrigg/add-max-zoom-param
Browse files Browse the repository at this point in the history
Adds maxZoom param to override TileLayer's default
  • Loading branch information
tprebs authored Sep 12, 2023
2 parents fdadd95 + 55de60c commit 072cfc7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/src/plugin/heatmap_layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ class HeatMapLayer extends StatefulWidget {
final HeatMapDataSource heatMapDataSource;
final Stream<void>? reset;
final TileDisplay tileDisplay;
final double maxZoom;

HeatMapLayer(
{super.key,
HeatMapOptions? heatMapOptions,
required this.heatMapDataSource,
List<WeightedLatLng>? initialData,
this.reset,
this.tileDisplay = const TileDisplay.fadeIn()})
this.tileDisplay = const TileDisplay.fadeIn(),
this.maxZoom = 18.0})
: heatMapOptions = heatMapOptions ?? HeatMapOptions();

@override
Expand Down Expand Up @@ -63,6 +65,7 @@ class _HeatMapLayerState extends State<HeatMapLayer> {
child: TileLayer(
backgroundColor: Colors.transparent,
tileSize: 256,
maxZoom: widget.maxZoom,
urlTemplate: pseudoUrl,
tileDisplay: widget.tileDisplay,
tileProvider: HeatMapTilesProvider(
Expand Down

0 comments on commit 072cfc7

Please sign in to comment.