Select to view content in your preferred language

Scale tile for missing zoom level

260
0
11-22-2022 02:40 AM
Karrok
by
Emerging Contributor

Hello, 

I have custom geoTiff, I sliced it to tiles and I use

BaseTileLayer.createSubclass -> getTileUrl for loading these tiles to a separate layer
If some tiles are missing my API server will return 404,
I have tiles for 18 zoom level max
If I will zoom, it works fine - an image will scale, even to 23 level, this is great!
But, if I will move my extent I will see just a default Esri map,
also, if I will move my extent back - the scaled tile is gone.
Is it possible to "cache" loaded images and load scaled parts when it's necessary(on 404 error)?
 
So far I'm picturing something like - an interceptor that will save all images, then figure out how to translate tile coordinates between different zoom levels and use some particular cached image.
 
As example, I'm looking for something similar to Leaflet.TileLayer.Fallback demo page (ghybs.github.io)
0 Kudos
0 Replies