1 (edited by cubic 2017-04-13 13:12:47)

Topic: TileCaching only for online or offline maps too?

Hi,

I use the event hook you supply for feeding offline maptiles in your system ( OnStartDownloadTile(OnlineMapsTile tile)), there I retrieve offline map tiles out of a mbtiles file.
My question now is the caching compenent, is it useful or is it bypassed by this hook. So does it store the tiles in a cache regardless of where they come. I guess so, I just wanted to make sure not to bloat my app without using the feature...
best,Robert

Re: TileCaching only for online or offline maps too?

Hello.

If you only use offline tiles, you do not need to use the cache.
It's just too much.

If you use online + offline tiles, you need to use this way:

private void Start()
{
    map = OnlineMaps.instance;

    if (OnlineMapsCache.instance != null) OnlineMapsCache.instance.OnStartDownloadTile += OnStartDownloadTile;
    else map.OnStartDownloadTile += OnStartDownloadTile;
}

In this case only online tiles will be cached.
Tiles loaded from your scripts will not be duplicated in the cache.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: TileCaching only for online or offline maps too?

great thx