User Tools

Site Tools


thinkgeo.mapsuite.core.filebitmaptilecache

This is an old revision of the document!


ThinkGeo.MapSuite.Core.FileBitmapTileCache

<!– Class –> 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.

Inheritance Hierarchy

Members Summary

Public Constructors

Name Parameters DeclaringType Summary
Public MethodFileBitmapTileCache This is the default constructor.
Public MethodFileBitmapTileCache String This is the overloads constructor.
Public MethodFileBitmapTileCache String, String This is the overloads constructor.
Public MethodFileBitmapTileCache String, String, TileImageFormat, TileMatrix This is the constructor with all the parameters needed passed in.

Protected Constructors

Name Parameters DeclaringType Summary

Public Methods

Name Parameters DeclaringType Summary
Public MethodClearCache TileCache This method will clear all the tiles in the tileCache.
Public MethodClearCache TimeSpan
Public MethodClearCache Double
Public MethodClearCache TimeSpan, Double
Public MethodDeleteTile Tile TileCache This method will delete the target tile passed in.
Public MethodDeleteTiles RectangleShape TileCache This method will delete the tiles within the passed in worldExtent.
Public MethodEquals Object Object
Public MethodGetHashCode Object
Public MethodGetHigherScaleTile RectangleShape, Double BitmapTileCache This method will return the HigherScale BitmapTile which is always used for preview effects when ZoomIn or ZoomOut.
Public MethodGetTile RectangleShape BitmapTileCache This method returns the BitmapTile corresponding to the tile bounding box passed in.
Public MethodGetTile Int64, Int64 BitmapTileCache This method returns the BitmapTile corresponding to passed in row and column.
Public MethodGetTileImageFileName Int64, Int64
Public MethodGetTileImageFileNames RectangleShape
Public MethodGetTiles RectangleShape BitmapTileCache This method returns all the BitmapTiles within the passed in world extent, some of which may not has bitmap.
Public MethodGetType Object
Public MethodSaveTile Tile TileCache This method will save the target tile passed in.
Public MethodSaveTiles Bitmap, RectangleShape, Boolean TileCache
Public MethodSaveTiles Bitmap, RectangleShape TileCache This method will save the bitmap with its extent attached into tiles.
Public MethodToString Object

Protected Methods

Name Parameters DeclaringType Summary
Protected MethodClearCacheCore TileCache(overriden) This method will clear all the tiles in the tileCache.
Protected MethodDeleteTileCore Tile TileCache(overriden) This method will delete the target tile passed in.
Protected MethodFinalize Object
Protected MethodGetHigherScaleTileCore RectangleShape, Double BitmapTileCache(overriden) This method overrides the logic in its base class BitmapTileCache. This method will return the HigherScale BitmapTile which is always used for preview effects when ZoomIn or ZoomOut.
Protected MethodGetTileCore Int64, Int64 BitmapTileCache(overriden) This method returns the BitmapTile corresponding to passed in row and column.
Protected MethodMemberwiseClone Object
Protected MethodMergeBitmaps IEnumerable<BitmapTile>, Double BitmapTileCache This method will merege the passed in bitmap tiles into a larege bitmap tile.
Protected MethodOnGettingCacheImage GettingCacheImageBitmapTileCacheEventArgs BitmapTileCache
Protected MethodOnGottenCacheImage GottenCacheImageBitmapTileCacheEventArgs BitmapTileCache
Protected MethodSaveTileCore Tile TileCache(overriden) This method will save the target tile passed in, you could override this API to create your own logic.

Public Properties

Name Return DeclaringType Summary
Public PropertyCacheDirectory String Gets or sets the cache direcory.
Public PropertyCacheId String TileCache Gets or sets the id of the TileCache.
Public PropertyExpirationTime TimeSpan
Public PropertyImageFormat TileImageFormat TileCache Gets or sets the tile image format.
Public PropertyJpegQuality Int16 TileCache Gets or sets the Jpeg quality , this property only take effects when setting the ImageFormat to Jpeg.
Public PropertyLoadingTileImage Bitmap TileCache This property returns back a preset image showing the Tile is loading.
Public PropertyNoDataTileImage Bitmap TileCache This property returns back a preset image showing the tile data is missing.
Public PropertyTileAccessMode TileAccessMode TileCache Gets or sets the Mode for the TileCache access the tiles. The Default value is ReadAddDelete
Public PropertyTileMatrix TileMatrix TileCache Gets or sets the TileMatrix which is used in caculation for tiles.

Protected Properties

Name Return DeclaringType Summary

Public Events

Public Constructors

FileBitmapTileCache()

This is the default constructor.

Remarks

If you use this constructor, you have to set the properties manually.

Parameters

Name Type Description

Go Back

FileBitmapTileCache(String)

This is the overloads constructor.

Remarks

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

Parameters

Name Type Description
cacheDirectory String<!– System.String –> This parameter specifies the cache directory of the tile cache.

Go Back

FileBitmapTileCache(String, String)

This is the overloads constructor.

Remarks

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

Parameters

Name Type Description
cacheDirectory String<!– System.String –> This parameter specifies the cache directory of the tile cache.
cacheId String<!– System.String –> This parameter specifies the cache id of the tile cache.

Go Back

FileBitmapTileCache(String, String, TileImageFormat, TileMatrix)

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

Parameters

Name Type Description
cacheDirectory String<!– System.String –> This parameter specifies the cache directory of the tile cache.
cacheId String<!– System.String –> This parameter specifies the cache id of the tile cache.
imageFormat TileImageFormat<!– ThinkGeo.MapSuite.Core.TileImageFormat –> This parameter specifies the image format of the tile cahce.
tileMatrix TileMatrix<!– ThinkGeo.MapSuite.Core.TileMatrix –> This parameter specifies the tile matrix of the tile cache.

Go Back

Protected Constructors

Public Methods

ClearCache()

This method will clear all the tiles in the tileCache.

Remarks

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

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description

<!– ThinkGeo.MapSuite.Core.TileCache –> Go Back

ClearCache(TimeSpan)

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
tileExpiration TimeSpan<!– System.TimeSpan –>

<!– ThinkGeo.MapSuite.Core.FileBitmapTileCache –> Go Back

ClearCache(Double)

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
maxSizeInMegabytes Double<!– System.Double –>

<!– ThinkGeo.MapSuite.Core.FileBitmapTileCache –> Go Back

ClearCache(TimeSpan, Double)

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
tileExpiration TimeSpan<!– System.TimeSpan –>
maxSizeInMegabytes Double<!– System.Double –>

<!– ThinkGeo.MapSuite.Core.FileBitmapTileCache –> Go Back

DeleteTile(Tile)

This method will delete the target tile passed in.

Remarks

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

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
tile Tile<!– ThinkGeo.MapSuite.Core.Tile –> The target tile to be deleted.

<!– ThinkGeo.MapSuite.Core.TileCache –> Go Back

DeleteTiles(RectangleShape)

This method will delete the tiles within the passed in worldExtent.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
worldExtent RectangleShape<!– ThinkGeo.MapSuite.Core.RectangleShape –> The target extent to delete all tiles within it.

<!– ThinkGeo.MapSuite.Core.TileCache –> Go Back

Equals(Object)

Return Value

Return Type Description
Boolean<!– System.Boolean –>

Parameters

Name Type Description
obj Object<!– System.Object –>

<!– System.Object –> Go Back

GetHashCode()

Return Value

Return Type Description
Int32<!– System.Int32 –>

Parameters

Name Type Description

<!– System.Object –> Go Back

GetHigherScaleTile(RectangleShape, Double)

This method will return the HigherScale BitmapTile which is always used for preview effects when ZoomIn or ZoomOut.

Return Value

Return Type Description
BitmapTile<!– ThinkGeo.MapSuite.Core.BitmapTile –> Returns the higher scale(higher zoomLevel) bitmap tile.

Parameters

Name Type Description
tileBoundingBox RectangleShape<!– ThinkGeo.MapSuite.Core.RectangleShape –> The parameter specifies the current tile bounding box.
tileScale Double<!– System.Double –> This parameter specifies the current tile scale.

<!– ThinkGeo.MapSuite.Core.BitmapTileCache –> Go Back

GetTile(RectangleShape)

This method returns the BitmapTile corresponding to the tile bounding box passed in.

Return Value

Return Type Description
BitmapTile<!– ThinkGeo.MapSuite.Core.BitmapTile –> Returns the BitmapTile corresponding to the passed in boundingBox.

Parameters

Name Type Description
tileBoundingBox RectangleShape<!– ThinkGeo.MapSuite.Core.RectangleShape –> The target boundingBox for the tile to fetch.

<!– ThinkGeo.MapSuite.Core.BitmapTileCache –> Go Back

GetTile(Int64, Int64)

This method returns the BitmapTile corresponding to passed in row and column.

Return Value

Return Type Description
BitmapTile<!– ThinkGeo.MapSuite.Core.BitmapTile –> Returns the BitmapTile corresponding to the passed in row and column.

Parameters

Name Type Description
row Int64<!– System.Int64 –> The target row for the tile to fetch.
column Int64<!– System.Int64 –> The target column for the tile to fetch.

<!– ThinkGeo.MapSuite.Core.BitmapTileCache –> Go Back

GetTileImageFileName(Int64, Int64)

Return Value

Return Type Description
String<!– System.String –>

Parameters

Name Type Description
row Int64<!– System.Int64 –>
column Int64<!– System.Int64 –>

<!– ThinkGeo.MapSuite.Core.FileBitmapTileCache –> Go Back

GetTileImageFileNames(RectangleShape)

Return Value

Return Type Description
Collection<String><!– System.Collections.ObjectModel.Collection{System.String} –>

Parameters

Name Type Description
tileBoundingBox RectangleShape<!– ThinkGeo.MapSuite.Core.RectangleShape –>

<!– ThinkGeo.MapSuite.Core.FileBitmapTileCache –> Go Back

GetTiles(RectangleShape)

This method returns all the BitmapTiles within the passed in world extent, some of which may not has bitmap.

Return Value

Return Type Description
Collection<BitmapTile><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.BitmapTile} –> Returns a collection of BitmapTiles within the passed in worldExtent.

Parameters

Name Type Description
worldExtent RectangleShape<!– ThinkGeo.MapSuite.Core.RectangleShape –> The target worldExtent will be used to fetch all the BitmapTiles from.

<!– ThinkGeo.MapSuite.Core.BitmapTileCache –> Go Back

GetType()

Return Value

Return Type Description
Type<!– System.Type –>

Parameters

Name Type Description

<!– System.Object –> Go Back

SaveTile(Tile)

This method will save the target tile passed in.

Remarks

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

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
tile Tile<!– ThinkGeo.MapSuite.Core.Tile –> The target tile to be saved.

<!– ThinkGeo.MapSuite.Core.TileCache –> Go Back

SaveTiles(Bitmap, RectangleShape, Boolean)

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
bitmap Bitmap<!– System.Drawing.Bitmap –>
bitmapExtent RectangleShape<!– ThinkGeo.MapSuite.Core.RectangleShape –>
saveContainedCellsOnly Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.Core.TileCache –> Go Back

SaveTiles(Bitmap, RectangleShape)

This method will save the bitmap with its extent attached into tiles.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
bitmap Bitmap<!– System.Drawing.Bitmap –> The target bitmap to be saved into tiles.
bitmapExtent RectangleShape<!– ThinkGeo.MapSuite.Core.RectangleShape –> The target extent for the bitmap.

<!– ThinkGeo.MapSuite.Core.TileCache –> Go Back

ToString()

Return Value

Return Type Description
String<!– System.String –>

Parameters

Name Type Description

<!– System.Object –> Go Back

Protected Methods

ClearCacheCore()

This method will clear all the tiles in the tileCache.

Remarks

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

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description

<!– ThinkGeo.MapSuite.Core.TileCache(overriden) –> Go Back

DeleteTileCore(Tile)

This method will delete the target tile passed in.

Remarks

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

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
tile Tile<!– ThinkGeo.MapSuite.Core.Tile –> The target tile to be deleted.

<!– ThinkGeo.MapSuite.Core.TileCache(overriden) –> Go Back

Finalize()

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description

<!– System.Object –> Go Back

GetHigherScaleTileCore(RectangleShape, Double)

This method overrides the logic in its base class BitmapTileCache. This method will return the HigherScale BitmapTile which is always used for preview effects when ZoomIn or ZoomOut.

Return Value

Return Type Description
BitmapTile<!– ThinkGeo.MapSuite.Core.BitmapTile –> Returns the higher scale(higher zoomLevel) bitmap tile.

Parameters

Name Type Description
tileBoundingBox RectangleShape<!– ThinkGeo.MapSuite.Core.RectangleShape –> The parameter specifies the current tile bounding box.
tileScale Double<!– System.Double –> This parameter specifies the current tile scale.

<!– ThinkGeo.MapSuite.Core.BitmapTileCache(overriden) –> Go Back

GetTileCore(Int64, Int64)

This method returns the BitmapTile corresponding to passed in row and column.

Return Value

Return Type Description
BitmapTile<!– ThinkGeo.MapSuite.Core.BitmapTile –> Returns the BitmapTile corresponding to the passed in row and column.

Parameters

Name Type Description
row Int64<!– System.Int64 –> The target row for the tile to fetch.
column Int64<!– System.Int64 –> The target column for the tile to fetch.

<!– ThinkGeo.MapSuite.Core.BitmapTileCache(overriden) –> Go Back

MemberwiseClone()

Return Value

Return Type Description
Object<!– System.Object –>

Parameters

Name Type Description

<!– System.Object –> Go Back

MergeBitmaps(IEnumerable<BitmapTile>, Double)

This method will merege the passed in bitmap tiles into a larege bitmap tile.

Return Value

Return Type Description
BitmapTile<!– ThinkGeo.MapSuite.Core.BitmapTile –> Returns a merged bitmap tile.

Parameters

Name Type Description
tilesToMerge IEnumerable<BitmapTile><!– System.Collections.Generic.IEnumerable{ThinkGeo.MapSuite.Core.BitmapTile} –> The collection of tiles to be mereged.
scale Double<!– System.Double –> The target scale for result mereged bitmap tile.

<!– ThinkGeo.MapSuite.Core.BitmapTileCache –> Go Back

OnGettingCacheImage(GettingCacheImageBitmapTileCacheEventArgs)

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
e GettingCacheImageBitmapTileCacheEventArgs<!– ThinkGeo.MapSuite.Core.GettingCacheImageBitmapTileCacheEventArgs –>

<!– ThinkGeo.MapSuite.Core.BitmapTileCache –> Go Back

OnGottenCacheImage(GottenCacheImageBitmapTileCacheEventArgs)

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
e GottenCacheImageBitmapTileCacheEventArgs<!– ThinkGeo.MapSuite.Core.GottenCacheImageBitmapTileCacheEventArgs –>

<!– ThinkGeo.MapSuite.Core.BitmapTileCache –> Go Back

SaveTileCore(Tile)

This method will save the target tile passed in, you could override this API to create your own logic.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
tile Tile<!– ThinkGeo.MapSuite.Core.Tile –> The target tile to be saved.

<!– ThinkGeo.MapSuite.Core.TileCache(overriden) –> Go Back

Public Properties

CacheDirectory

Gets or sets the cache direcory.

Return Value

Return Type
String<!– System.String –>

<!– ThinkGeo.MapSuite.Core.FileBitmapTileCache –> Go Back

CacheId

Gets or sets the id of the TileCache.

Return Value

Return Type
String<!– System.String –>

<!– ThinkGeo.MapSuite.Core.TileCache –> Go Back

ExpirationTime

Return Value

Return Type
TimeSpan<!– System.TimeSpan –>

<!– ThinkGeo.MapSuite.Core.FileBitmapTileCache –> Go Back

ImageFormat

Gets or sets the tile image format.

Return Value

Return Type
TileImageFormat<!– ThinkGeo.MapSuite.Core.TileImageFormat –>

<!– ThinkGeo.MapSuite.Core.TileCache –> Go Back

JpegQuality

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

Return Value

Return Type
Int16<!– System.Int16 –>

<!– ThinkGeo.MapSuite.Core.TileCache –> Go Back

LoadingTileImage

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

Return Value

Return Type
Bitmap<!– System.Drawing.Bitmap –>

<!– ThinkGeo.MapSuite.Core.TileCache –> Go Back

NoDataTileImage

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

Return Value

Return Type
Bitmap<!– System.Drawing.Bitmap –>

<!– ThinkGeo.MapSuite.Core.TileCache –> Go Back

TileAccessMode

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

Remarks

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

Return Value

Return Type
TileAccessMode<!– ThinkGeo.MapSuite.Core.TileAccessMode –>

<!– ThinkGeo.MapSuite.Core.TileCache –> Go Back

TileMatrix

Gets or sets the TileMatrix which is used in caculation for tiles.

Return Value

Return Type
TileMatrix<!– ThinkGeo.MapSuite.Core.TileMatrix –>

<!– ThinkGeo.MapSuite.Core.TileCache –> Go Back

Protected Properties

Public Events

GettingCacheImage

Event Arguments

Event Arguments
GettingCacheImageBitmapTileCacheEventArgs<!– ThinkGeo.MapSuite.Core.GettingCacheImageBitmapTileCacheEventArgs –>

<!– ThinkGeo.MapSuite.Core.BitmapTileCache –> Go Back

GottenCacheImage

Event Arguments

Event Arguments
GottenCacheImageBitmapTileCacheEventArgs<!– ThinkGeo.MapSuite.Core.GottenCacheImageBitmapTileCacheEventArgs –>

<!– ThinkGeo.MapSuite.Core.BitmapTileCache –> Go Back

NOTOC MapSuiteCore ThinkGeo.MapSuite.Core UpdateDocumentation

thinkgeo.mapsuite.core.filebitmaptilecache.1440040128.txt.gz · Last modified: 2015/09/17 09:00 (external edit)