FileTileBitmapCache class
A file cache for the bitmaps of a Tile. The implementation can distinguish different sets of Tiles depending on the renderkey. This can be used to cache for example tiles used by day as well as tiles used by night.
- Inheritance
-
- Object
- TileBitmapCache
- FileTileBitmapCache
- Implementers
Constructors
- FileTileBitmapCache(String renderkey, bool png, int tileSize)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- png → bool
-
true if the images should be stored in PNG format, false for raw format which is faster but consumes more space.
PNG: 470ms for 16 files, RAW: 400ms for the same 16 files
final
- renderkey ↔ String
-
a unique key for the rendered bitmaps. The key should be dependent of the renderingTheme. In other words if the bitmaps should be
rendered differently (day/night for example or different mapfiles) there should be different rendering keys
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tileSize → int
-
final
Methods
-
addTileBitmap(
Tile tile, TileBitmap tileBitmap) → void -
Adds a bitmap to the cache
override
-
dispose(
) → void -
disposes the cache. It should not be used anymore after disposing.
override
-
getTileBitmapAsync(
Tile tile) → Future< TileBitmap?> -
override
-
getTileBitmapSync(
Tile tile) → TileBitmap? -
Returns the requested bitmap for the given Tile
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
purgeAll(
) → Future< void> -
Purges the whole cache. The cache can be used afterwards but will not return any items
override
-
purgeByBoundary(
BoundingBox boundingBox) → Future< void> -
Purges the cache whose Tiles intersects with the given
boundingBox
. Any bitmap which is fully or partially intersecting the givenboundingBox
will be purged.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
String renderkey, [dynamic png = true, dynamic tileSize = 256]) → Future< FileTileBitmapCache> -
purgeAllCaches(
) → Future< void> - Purges all cached files from all caches regardless if the cache is used or not