I am creating a desktop application via Unity for Windows and Mac. I was wondering if it is possible to save tiles for a certain area locally so they can be loaded across application plays?
My application involves searching for locations and then loading the tiles for that area. Can these loaded tiles be saved?
If not across application plays, can the tiles be saved during the same runtime if the user navigates away from the specific location (city A to city B) and then back to it (City A)?
Hi @sayxli,
Tiles are saved in memory during a single run, up to the limit of the “Maximum Cached Bytes” property on the Cesium3DTileset. So by increasing this, you’ll increase the chances that the tiles are still available when you come back to an area you have previously visited. Please be aware that this number is a bit “fuzzy”, so setting it to a large number may go well even if you have lots of RAM. But increasing beyond the default 256MB on a desktop or laptop system is very reasonable.
Tiles are also cached on disk, but this is subject to policy set by HTTP caching headers. Tiles from Cesium ion, such as Cesium World Terrain and Cesium OSM Buildings, can effectively be cached forever. If you’re using Google Photorealistic 3D Tiles, however, Google returns response headers that only allow these to be cached for four hours.
Hi Kevin, can you please expand on this statement? We are often demonstrating content at trade shows, where internet is very unreliable, and it would be really useful if we could cache data even for a week or a month, just for the sake of dealing with the bad internet situation. We have used Google regularly with solid internet, but are well aware of the caching restrictions, and looking for a better alternative.
An ideal alternative would be to host certain sections of the map yourself. That’s what I’m doing. No internet connection required, perfect for events.
You can host everything cesium provides (terrain texture, 3D elevation, buildings) locally and offline, it’ requires a bit of work at first but entirely possible! I’m happy to explain a few things if that would help you guys out.