Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/src/layer/tile_layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,6 @@ class _TileLayerState extends State<TileLayer> with TickerProviderStateMixin {
}

_pruneTiles();

_setZoomTransforms(center, zoom);
}

void _setZoomTransforms(LatLng center, double zoom) {
Expand Down Expand Up @@ -665,19 +663,23 @@ class _TileLayerState extends State<TileLayer> with TickerProviderStateMixin {

if (_tileZoom == null) {
// if there is no _tileZoom available it means we are out within zoom level
// we will restory fully via _setView call if we are back on trail
// we will restore fully via _setView call if we are back on trail
if ((options.maxZoom != null && tileZoom <= options.maxZoom) &&
(options.minZoom != null && tileZoom >= options.minZoom)) {
_tileZoom = tileZoom;
setState(() {
_setView(map.center, tileZoom);

_setZoomTransforms(map.center, map.zoom);
});
}
} else {
setState(() {
if ((tileZoom - _tileZoom).abs() >= 1) {
// It was a zoom lvl change
_setView(map.center, tileZoom);

_setZoomTransforms(map.center, map.zoom);
} else {
if (null == _throttleUpdate) {
_update(null);
Expand Down