Edit this page

The IMapCacheProvider is a provider which doesn't connect to any real imagery services. It is used by an IMapTileProvider to allow data caching and improve performance.


By default, a MemoryCacheProvider is assigned to the IMapTileProvider to cache data into memory.


The LocalFileCacheProvider.CacheDirectoryPath property gets or sets the cache directory path.

You should set the IMapTileProvider.EnableCaching property to true to allow data caching. Then, set the IMapTileProvider.CacheProvider property to a new LocalFileCacheProvider associated with a folder name.

Using LocalFileCacheProvider with BingRestMapProvider

string cacheFolder = @"..\..\cache";
BingRestMapProvider bingProvider = new Telerik.WinControls.UI.BingRestMapProvider();
bingProvider.UseSession = true;
bingProvider.BingKey = bingKey;
LocalFileCacheProvider cache = new LocalFileCacheProvider(cacheFolder);
bingProvider.CacheProvider = cache;

Dim cacheFolder As String = "..\..\cache"
Dim bingProvider As BingRestMapProvider = New Telerik.WinControls.UI.BingRestMapProvider()
bingProvider.UseSession = True
bingProvider.BingKey = bingKey
Dim cache As New LocalFileCacheProvider(cacheFolder)
bingProvider.CacheProvider = cache