You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! As part of investigating #4311, I noticed that in some cases the source cache size for raster tiles may be set incorrectly.
To reproduce:
Load this jsbin that includes a raster source; I've reproduced this on both retina and non-retina displays, using Chrome on macOS
Open the console to see that the actual cache size is too small for the number of tiles
mapbox-gl-js version: 0.32.1
Expected Behavior
The cache should be able to accommodate 5 zoom levels of tiles (if I'm interpreting the line const commonZoomRange = 5; correctly)
Actual Behavior
The cache only accommodates ~1.5 zoom levels of tiles. SourceCache#updateCacheSize is using transform.tileSize, which has a value of 512px, when the tiles are actually 256px. As a result, it thinks that 1/4 as many tiles are being rendered.
Am I correct that the intent in SourceCache is to cache 5 zoom levels of tiles?
From what I can tell, this issue only affects raster sources, not vector sources (here's a vector jsbin for reference). Even with the limited cache size, the map still functions pretty well, so I don't think there's any rush to fix this before #2291 is complete.
The text was updated successfully, but these errors were encountered:
Hello! As part of investigating #4311, I noticed that in some cases the source cache size for raster tiles may be set incorrectly.
To reproduce:
Load this jsbin that includes a raster source; I've reproduced this on both retina and non-retina displays, using Chrome on macOS
Open the console to see that the actual cache size is too small for the number of tiles
mapbox-gl-js version: 0.32.1
Expected Behavior
The cache should be able to accommodate 5 zoom levels of tiles (if I'm interpreting the line
const commonZoomRange = 5;
correctly)Actual Behavior
The cache only accommodates ~1.5 zoom levels of tiles. SourceCache#updateCacheSize is using
transform.tileSize
, which has a value of512px
, when the tiles are actually256px
. As a result, it thinks that 1/4 as many tiles are being rendered.Am I correct that the intent in SourceCache is to cache 5 zoom levels of tiles?
From what I can tell, this issue only affects raster sources, not vector sources (here's a vector jsbin for reference). Even with the limited cache size, the map still functions pretty well, so I don't think there's any rush to fix this before #2291 is complete.
The text was updated successfully, but these errors were encountered: