InMemoryRasterTileCache¶
Namespace: ThinkGeo.Core
This class is a concrete class inherits from BitmapTileCache. In this class, the tiles will be saved in memory and it provides some properties to control it very easily.
public class InMemoryRasterTileCache : RasterTileCache
Inheritance Object → TileCache → RasterTileCache → InMemoryRasterTileCache
Properties¶
MaximumTilesCount¶
This property gets or sets the maximum tiles count, if it exceed,it will delete the old first cached tiles.
public int MaximumTilesCount { get; set; }
Property Value¶
NoDataTileImage¶
This property returns back a preset image showing the tileView data is missing.
public GeoImage NoDataTileImage { get; }
Property Value¶
LoadingTileImage¶
This property returns back a preset image showing the Tile is loading.
public GeoImage LoadingTileImage { get; }
Property Value¶
ImageFormat¶
Gets or sets the tileView image format.
public GeoImageFormat ImageFormat { get; set; }
Property Value¶
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¶
TileAccessMode¶
Gets or sets the Mode for the TileCache access the tiles. The Default value is ReadAddDelete
public TileAccessMode TileAccessMode { get; set; }
Property Value¶
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¶
ExpirationTime¶
public TimeSpan ExpirationTime { get; set; }
Property Value¶
Constructors¶
InMemoryRasterTileCache()¶
This is the default constructor.
public InMemoryRasterTileCache()
Remarks:
If you use this constructor, you have to set the properties manually.
Methods¶
GetTileCore(Int32, Int64, Int64)¶
This method returns the BitmapTile corresponding to passed in row and column.
protected Tile GetTileCore(int zoom, long column, long row)
Parameters¶
zoom
Int32
column
Int64
The target column for the tileView to fetch.
row
Int64
The target row for the tileView to fetch.
Returns¶
Tile
Returns the BitmapTile corresponding to the passed in row and column.
SaveTileCore(Tile)¶
This method will save the target tileView passed in.
protected void SaveTileCore(Tile tile)
Parameters¶
tile
Tile
The target tileView to be saved.
DeleteTileCore(Tile)¶
This method will delete the target tileView passed in.
protected void DeleteTileCore(Tile tile)
Parameters¶
tile
Tile
The target tileView to be deleted.
ClearCacheCore()¶
This method will clear all the tiles in the tileCache.
protected void ClearCacheCore()
Events¶
GottenCacheTile¶
public event EventHandler<GottenCacheImageBitmapTileCacheEventArgs> GottenCacheTile;
GettingCacheTile¶
public event EventHandler<GettingCacheImageBitmapTileCacheEventArgs> GettingCacheTile;