IsolateFileTileBitmapCache 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.

Note: Currently not working since dart.ui package is not available in secondary isolates.

Inheritance

Constructors

IsolateFileTileBitmapCache(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
finalinherited
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 pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tileSize int
finalinherited

Methods

addTileBitmap(Tile tile, TileBitmap tileBitmap) → void
Adds a bitmap to the cache
override
dispose() → void
inherited
getTileBitmapAsync(Tile tile) Future<TileBitmap?>
override
getTileBitmapSync(Tile tile) → TileBitmap?
Returns the requested bitmap for the given Tile
override
isOpen() Future<bool>
inherited
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 given boundingBox will be purged.
override
sendToIsolate<T extends IsolateReplyParams>(IsolateRequestParams isolateRequestParams) Future<T>
inherited
startIsolateJob(IsolateInitParams isolateInitParams, EntryPoint<IsolateInitParams> entryPoint) Future<void>
Isolates currently not suitable for our purpose. Most UI canvas calls are not accessible from isolates so we cannot produce the bitmap.
inherited
stopIsolateJob() → void
inherited
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<IsolateFileTileBitmapCache>
override
purgeAllCaches() Future<void>
Purges all cached files from all caches regardless if the cache is used or not
override