0

Imagine you have a map and a search bar. You start at zoom level 2 globe projection. As soon as you typed the location you after and hit enter camera flies to the location. Unfortunately you can see how tiles are being loaded.

preloadOnly: true does not work.

Does anyone found a way to reduce this problem?

I know it will not go away completely for bad connection, but there should be a good balance between the speed of animation, tiles size and cache tiles

artpen
  • 25
  • 7
  • You're asking how to cache tiles at a high level of zoom for the entire world in the browser before it loads? – Steve Bennett Mar 06 '23 at 22:09
  • Anything really to make it load tiles faster. Ideally preload tiles before animation starts over the path of camera movement. Or preload some zoom levels , and while animation is playing start preloading the next zoom levels tiles. – artpen Mar 08 '23 at 08:30

1 Answers1

0

You are saying that preloadOnly does not work ? can you please detail the issue ? did you have a console error / exception ?

On my side, using version v2.14.0, I try the preloadOnly and I get the following error

urce_cache.js:1025 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'tileZoom')
at source_cache.js:1025:108
at util.js:277:9
at Array.forEach (<anonymous>)
at M (util.js:276:11)
at sy._preloadTiles (source_cache.js:1024:9)
at map.js:3596:52
at util.js:277:9
at Array.forEach (<anonymous>)
at Object.M [as asyncAll] (util.js:276:11)
at Map._preloadTiles (map.js:3596:9)

(

fvisticot
  • 7,936
  • 14
  • 49
  • 79