ThinkGeo.com    |     Blog    |     Wiki    |     Support

Preview Tile cache

I do not fully understand what is the preview tile cache and how to make it works. Can you send me an example or explain it to me? I use MapSuite 10 for winforms.

Hi Mario,

I think I understand what’s your means about the smooth in the other topic.

As below is the sample code about how to use PreviewTileCache:

            winformsMap1.ThreadingMode = MapThreadingMode.Multithreaded;
        FileBitmapTileCache cache = new FileBitmapTileCache("YourCacheFolder", "world");
        

        WorldStreetsAndImageryOverlay worldOverlay = new WorldStreetsAndImageryOverlay();
        worldOverlay.PreviewTileCache = cache;
        winformsMap1.Overlays.Add(worldOverlay);

Wish that’s helpful.

Regards,

Ethan

You use WorldStreetsAndImageryOverlay. Does Preview tile cache work with LayerOverlay and OpenStreetMapOverlay too?

Hi Mario,

It works for Overlay, please don’t forget set the ThreadingMode to Multithreaded.

Regards,

Ethan