Class FileRasterTileCache
This class is a concrete class inherits from BitmapTileCache. In this class, the tiles will be saved in disk and can be viewed very conveniently.
public class FileRasterTileCache : RasterTileCache
- Inheritance
-
FileRasterTileCache
- Derived
- Inherited Members
Constructors
FileRasterTileCache()
This is the default constructor.
public FileRasterTileCache()
Remarks
If you use this constructor, you have to set the properties manually.
FileRasterTileCache(string)
This is the overloads constructor.
public FileRasterTileCache(string cacheDirectory)
Parameters
cacheDirectory
stringThis parameter specifies the cache directory of the tileView cache.
Remarks
If you use this constructor, the other properties are set with default values.
FileRasterTileCache(string, string)
This is the overloads constructor.
public FileRasterTileCache(string cacheDirectory, string cacheId)
Parameters
cacheDirectory
stringThis parameter specifies the cache directory of the tileView cache.
cacheId
stringThis parameter specifies the cache id of the tileView cache.
Remarks
If you use this constructor, the other properties are set with default values.
FileRasterTileCache(string, string, GeoImageFormat)
This is the constructor with all the parameters needed passed in.
public FileRasterTileCache(string cacheDirectory, string cacheId, GeoImageFormat imageFormat)
Parameters
cacheDirectory
stringThis parameter specifies the cache directory of the tileView cache.
cacheId
stringThis parameter specifies the cache id of the tileView cache.
imageFormat
GeoImageFormatThis parameter specifies the image format of the tileView cahce.
Properties
CacheDirectory
Gets or sets the cache direcory.
public string CacheDirectory { get; set; }
Property Value
Methods
ClearCache(double)
public void ClearCache(double maxSizeInMegabytes)
Parameters
maxSizeInMegabytes
double
ClearCache(TimeSpan)
public void ClearCache(TimeSpan tileExpiration)
Parameters
tileExpiration
TimeSpan
ClearCache(TimeSpan, double)
public void ClearCache(TimeSpan tileExpiration, double maxSizeInMegabytes)
Parameters
ClearCacheCore()
This method will clear all the tiles in the tileCache.
protected override void ClearCacheCore()
Remarks
This method will not take effect when the Read is set to true.
DeleteTileCore(Tile)
This method will delete the target tileView passed in.
protected override void DeleteTileCore(Tile tile)
Parameters
tile
TileThe target tileView to be deleted.
Remarks
This method will not take effect when the Read is set to true.
GetTileAsyncCore(int, long, long, CancellationToken)
This method returns the BitmapTile corresponding to passed in row and column.
protected override Task<Tile> GetTileAsyncCore(int zoom, long column, long row, CancellationToken cancellationToken)
Parameters
zoom
intcolumn
longThe target column for the tileView to fetch.
row
longThe target row for the tileView to fetch.
cancellationToken
CancellationToken
Returns
GetTileCore(int, long, long)
This method returns the BitmapTile corresponding to passed in row and column.
protected override Tile GetTileCore(int zoom, long column, long row)
Parameters
zoom
intcolumn
longThe target column for the tileView to fetch.
row
longThe target row for the tileView to fetch.
Returns
- Tile
Returns the BitmapTile corresponding to the passed in row and column.
SaveTileAsyncCore(Tile, CancellationToken)
protected override Task SaveTileAsyncCore(Tile tile, CancellationToken cancellationToken)
Parameters
tile
TilecancellationToken
CancellationToken
Returns
SaveTileCore(Tile)
This method will save the target tileView passed in, you could override this API to create your own logic.
protected override void SaveTileCore(Tile tile)
Parameters
tile
TileThe target tileView to be saved.
ToString()
public override string ToString()