Skip to content

SessionFileRasterTileCache

Namespace: ThinkGeo.Core

This class is a concrete class that inherits from FileBitmapTileCache. In this class, the tiles will be marked as obsolete when you call the ClearCache method and will be deleted in a background thread.

public class SessionFileRasterTileCache : FileRasterTileCache

Inheritance ObjectTileCacheRasterTileCacheFileRasterTileCacheSessionFileRasterTileCache

Properties

CacheDirectory

Gets or sets the cache direcory.

public string CacheDirectory { get; set; }

Property Value

String

NoDataTileImage

This property returns back a preset image showing the tileView data is missing.

public GeoImage NoDataTileImage { get; }

Property Value

GeoImage

LoadingTileImage

This property returns back a preset image showing the Tile is loading.

public GeoImage LoadingTileImage { get; }

Property Value

GeoImage

ImageFormat

Gets or sets the tileView image format.

public GeoImageFormat ImageFormat { get; set; }

Property Value

GeoImageFormat

JpegQuality

Gets or sets the Jpeg quality , this property only take effects when setting the ImageFormat to Jpeg.

public short JpegQuality { get; set; }

Property Value

Int16

TileAccessMode

Gets or sets the Mode for the TileCache access the tiles. The Default value is ReadAddDelete

public TileAccessMode TileAccessMode { get; set; }

Property Value

TileAccessMode

Remarks:

If you want it to take effect, you need set the Read property false.

CacheId

Gets or sets the id of the TileCache.

public string CacheId { get; set; }

Property Value

String

ExpirationTime

public TimeSpan ExpirationTime { get; set; }

Property Value

TimeSpan

Constructors

SessionFileRasterTileCache()

This is the default constructor.

public SessionFileRasterTileCache()

Remarks:

If you use this constructor, you must set the properties manually.

SessionFileRasterTileCache(String)

This is the overloads constructor.

public SessionFileRasterTileCache(string cacheDirectory)

Parameters

cacheDirectory String
This parameter specifies the directory of the tileView cache.

Remarks:

If you use this constructor, the other properties are set with default values.

SessionFileRasterTileCache(String, String)

This is the overloads constructor.

public SessionFileRasterTileCache(string cacheDirectory, string cacheId)

Parameters

cacheDirectory String
This parameter specifies the directory of the tileView cache.

cacheId String
This parameter specifies the cache ID of the tileView cache.

Remarks:

If you use this constructor, the other properties are set with default values.

SessionFileRasterTileCache(String, String, GeoImageFormat)

This is the constructor with all the parameters needed passed in.

public SessionFileRasterTileCache(string cacheDirectory, string cacheId, GeoImageFormat imageFormat)

Parameters

cacheDirectory String
This parameter specifies the directory of the tileView cache.

cacheId String
This parameter specifies the cache IF of the tileView cache.

imageFormat GeoImageFormat
This parameter specifies the image format of the tileView cahce.

Methods

ClearCacheCore()

This method will create a new cacheId for the SessionFileBitmapTileCache and mark the original one as obsolete. The original will then be deleted in a background thread.

protected void ClearCacheCore()

Remarks:

This method will not take effect when ReadOnly is set to true.

Events

GottenCacheTile

public event EventHandler<GottenCacheImageBitmapTileCacheEventArgs> GottenCacheTile;

GettingCacheTile

public event EventHandler<GettingCacheImageBitmapTileCacheEventArgs> GettingCacheTile;