opoto/wtracks

Browser tab freezes when zooming a PMTiles layer

Closed this issue · 4 comments

The whole browser tab freezes if I use a PMTiles layer and zoom in or out.

I have tried it with file https://protomaps-static.sfo3.digitaloceanspaces.com/osm_carto.pmtiles which I found on page https://protomaps.github.io/PMTiles/#.

How to reproduce the problem:

  1. Create a personal map for the above-mentioned file (you can use https://opoto.github.io/wtracks/maps.html?import=https://opoto.github.io/wtracks/maps.html?import=eyJQTSAxIC4uIDMiOnsib3B0aW9ucyI6eyJtaW5ab29tIjoiMSIsIm1heFpvb20iOiIzIiwiYXR0cmlidXRpb24iOiIifSwidXJsIjoiaHR0cHM6Ly9wcm90b21hcHMtc3RhdGljLnNmbzMuZGlnaXRhbG9jZWFuc3BhY2VzLmNvbS9vc21fY2FydG8ucG10aWxlcyIsInR5cGUiOiJwbXRpbGVzIiwib3ZlcmxheSI6ZmFsc2UsIm5hbWUiOiJQTSAxIC4uIDMifX0=), but do not yet activate it before zooming out far enough, otherwise the browser tab will freeze immediately before you can see anything.
  2. Zoom out so far that Africa is completely visible (the debug console says this is zoom level 3)
  3. Now you can activate the PMTiles map and should see Africa as expected, you can also move the map around on this zoom level.
  4. If you try to zoom in, the browser tab freezes immediately.
  5. The browser tab also freezes if you zoom out far enough.
opoto commented

Hi
This time I think I found the root cause of the issue, which was actually in WTracks: a typing error in zoom options.
It should be fixed by dbd8b90.
I also restored auto-scaling for WMS overlays as this fix also solves #42.
Thanks for the detailed report

opoto commented

This time I'll wait for your confirmation that it is working fine to close this issue.

I confirm that I didn't have a single frozen browser tab since that fix and everything seems to be working fine. Thanks!

opoto commented

Good!
Closing