pigeon-maps icon indicating copy to clipboard operation
pigeon-maps copied to clipboard

Skip unloaded tiles when zooming out

Open mariusandra opened this issue 9 years ago • 3 comments

When zooming out, pigeon-maps remembers what tiles were visible for 4 zoom levels besides the visible one.

Then when all the tiles for the new zoom level fully load, the old tiles are discarded and removed from DOM.

This works okayish, but can get sluggish if we zoom out really fast, as then all the old tiles for the previous 4 zoom levels will also be loaded, resulting in a funny pixelating effect.

Instead of the current behaviour, we should only keep visible the tiles from other zoom levels that were fully loaded. This means if you zoom out from 14 to 10, only the few tiles that managed to load in zoom levels 11 to 13 will be shown, not all of them.

mariusandra avatar Dec 21 '16 15:12 mariusandra

I'm closing this issue as WONTFIX.

While the theory seems good, in practice it doesn't "free up" the browser from loading the images that were once in the DOM. So nothing gets faster, just less smooth.

Here's the current version Here's the new version that skips the tiles that were not loaded when zoomed out.

mariusandra avatar Dec 22 '16 22:12 mariusandra

Reopening, as we should still find a way to skip loading tiles that we know we will zoom past. For example there is no need to load every level from 18 to 3 if zooming from 18 to 3.

mariusandra avatar Dec 29 '16 08:12 mariusandra

The other engines use a system where tiles are only loaded after you finish zooming, like this:

Mapbox

We should investigate something similar.

mariusandra avatar Dec 31 '16 09:12 mariusandra