Open mattesCZ opened 4 years ago
@mattesCZ Do you think my issue #218 is solved by your PR?
@StefanBrand I'm not sure, but it's possible. Can you build the code in the fork and try it?
No, I cannot dedicate time to this at the moment and probably not in the near future.
In #151 there was introduced an optimization for tile loading inside
_isCurrentTile
function.I've experienced some issues when zooming out - some tiles were not loaded on zoomend. After some investigation, I found out that there is a problem with checking
currentBounds
in_isCurrentTile
.Imagine that the user is on zoom 15, some map bounds are active and zooms out with scroll. Immediately after the scroll event
map._zoom
is 15,map._animateToZoom
is 14 andmap.getBounds()
returns the "old" bounds before zoom transition. This is all fine, but the code in_isCurrentTile
mixes together the "old" bounds with "new" zoom 14. If some tiles for zoom 14 are somehow "cached", but they don't overlap current bounds, they are filled with empty data and never loaded again. This cached tiles should be checked against something likemap._animateToBounds
, ie. the bounds that will be active after the zoom transition to level 14.I will send a PR soon.