Skip to content

Commit

Permalink
Fixed TileLayer.reset (#1620)
Browse files Browse the repository at this point in the history
Co-authored-by: Rory Stephenson <rorystephenson@gmail.com>
  • Loading branch information
JaffaKetchup and rorystephenson authored Aug 23, 2023
1 parent 7088758 commit e5a7ec7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/src/layer/overlay_image_layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class OverlayImageLayer extends StatelessWidget {
return ClipRect(
child: Stack(
children: <Widget>[
for (var overlayImage in overlayImages)
for (final overlayImage in overlayImages)
overlayImage.buildPositionedForOverlay(map),
],
),
Expand Down
9 changes: 4 additions & 5 deletions lib/src/layer/tile_layer/tile_layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,10 @@ class _TileLayerState extends State<TileLayer> with TickerProviderStateMixin {
super.initState();

if (widget.reset != null) {
_resetSub = widget.reset?.listen(
(_) => _tileImageManager.removeAll(
widget.evictErrorTileStrategy,
),
);
_resetSub = widget.reset?.listen((_) {
_tileImageManager.removeAll(widget.evictErrorTileStrategy);
_loadAndPruneInVisibleBounds(MapCamera.of(context));
});
}

_tileRangeCalculator = TileRangeCalculator(tileSize: widget.tileSize);
Expand Down

0 comments on commit e5a7ec7

Please sign in to comment.