Constructor
new TileCache(options)
Parameters:
Name |
Type |
Description |
options |
Object
|
Configuration for this TileCache.
Properties
Name |
Type |
Attributes |
Description |
maxImageCacheCount |
Number
|
<optional>
|
See maxImageCacheCount in
OpenSeadragon.Options for details. |
|
- Source:
Methods
cacheTile(options)
Caches the specified tile, removing an old tile if necessary to stay under the
maxImageCacheCount specified on construction. Note that if multiple tiles reference
the same image, there may be more tiles than maxImageCacheCount; the goal is to keep
the number of images below that number. Note, as well, that even the number of images
may temporarily surpass that number, but should eventually come back down to the max specified.
Parameters:
Name |
Type |
Description |
options |
Object
|
Tile info.
Properties
Name |
Type |
Attributes |
Default |
Description |
tile |
OpenSeadragon.Tile
|
|
|
The tile to cache.
Properties
Name |
Type |
Description |
cacheKey |
String
|
The unique key used to identify this tile in the cache. |
|
image |
Image
|
|
|
The image of the tile to cache. |
tiledImage |
OpenSeadragon.TiledImage
|
|
|
The TiledImage that owns that tile. |
cutoff |
Number
|
<optional>
|
0
|
If adding this tile goes over the cache max count, this
function will release an old tile. The cutoff option specifies a tile level at or below which
tiles will not be released. |
|
- Source:
clearTilesFor(tiledImage)
Clears all tiles associated with the specified tiledImage.
Parameters:
- Source:
numTilesLoaded() → {Number}
- Source:
Returns:
The total number of tiles that have been loaded by
this TileCache.
-
Type
-
Number