new LayoutTileImages(url, type [, options])
Creates a new LayoutTileImages instance.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
url |
string | null | URL to the annotation file containing tile descriptors, or null if descriptors will be set later |
|
type |
string | The layout type (should be 'tile_images') |
|
options |
Object |
<optional> |
Configuration options inherited from Layout |
- Source:
Extends
Methods
-
available(viewport, transform, layerTransform, border, bias, tiles)
-
Gets tiles currently available for rendering.
Parameters:
Name Type Description viewport
Viewport Current viewport
transform
Transform Current transform
layerTransform
Transform Layer-specific transform
border
number Border size in viewport units
bias
number Resolution bias (unused in this layout)
tiles
Map.<number, Tile> Available tiles
- Overrides:
- Source:
Returns:
Map of tile index to tile object for visible, loaded tiles
- Type
- Object.<number, Tile>
-
boundingBox()
-
Gets the layout's bounding box.
- Overrides:
- Source:
Returns:
The bounding box containing all tile regions
- Type
- BoundingBox
-
getTileSize()
-
Gets the tile size. For this layout, tiles don't have a fixed size.
- Overrides:
- Source:
Returns:
Returns [0, 0] as tiles have variable sizes
- Type
- Array.<number>
-
getTileURL(id, tile)
-
Gets the URL for a specific tile.
Parameters:
Name Type Description id
number Channel/raster ID
tile
TileObj Tile object
- Overrides:
- Source:
Returns:
URL to fetch tile image
- Type
- string
-
getViewportBox(viewport, transform, layerT)
-
Calculates viewport bounding box
Parameters:
Name Type Description viewport
Object Viewport parameters
transform
Transform Current transform
layerT
Transform Layer transform
- Inherited From:
- Overrides:
- Source:
Returns:
Viewport bounds in image space
- Type
- BoundingBox
-
imageUrl(url, plane)
-
Constructs URL for specific image plane
Parameters:
Name Type Description url
string Base URL
plane
string Plane identifier
- Inherited From:
- Overrides:
- Source:
Returns:
Complete URL
- Type
- string
-
index(level, x, y)
-
Maps tile coordinates to a linear index. In this layout, x directly maps to the index as tiles are stored in a flat list.
Parameters:
Name Type Description level
number Zoom level (unused in this layout)
x
number X coordinate (used as index)
y
number Y coordinate (unused in this layout)
- Source:
Returns:
Linear index of the tile
- Type
- number
-
needed(viewport, transform, layerTransform, border, bias, tiles [, maxtiles])
-
Determines which tiles are needed for the current view.
Parameters:
Name Type Argument Default Description viewport
Viewport Current viewport
transform
Transform Current transform
layerTransform
Transform Layer-specific transform
border
number Border size in viewport units
bias
number Resolution bias (unused in this layout)
tiles
Map.<number, Tile> Currently available tiles
maxtiles
number <optional>
8 Maximum number of tiles to return
- Overrides:
- Source:
Returns:
Array of needed tiles sorted by distance to viewport center
- Type
- Array.<TileObj>
-
newTile(index)
-
Creates a new tile instance with properties from its descriptor.
Parameters:
Name Type Description index
number Index of the tile descriptor
- Overrides:
- Layout#newTile
- Source:
Returns:
New tile instance with region and image properties
- Type
- TileObj
-
setAllTilesVisible(visible)
-
Sets visibility for all tiles.
Parameters:
Name Type Description visible
boolean Visibility state to set for all tiles
- Source:
-
setTileDescriptors(tileDescriptors)
-
Sets tile descriptors programmatically instead of loading from a file.
Parameters:
Name Type Description tileDescriptors
Array.<Annotation> Array of tile descriptors
- Source:
Fires:
-
setTileVisible(index, visible)
-
Sets visibility for a specific tile.
Parameters:
Name Type Description index
number Index of the tile
visible
boolean Visibility state to set
- Source:
-
tileCoords(Obj})
-
Gets coordinates for a tile in both image space and texture space.
Parameters:
Name Type Description Obj}
tile - The tile to get coordinates for
- Overrides:
- Source:
Returns:
-
Coordinate data
- Type
- Object
-
.coords - Image space coordinates [x,y,z, x,y,z, x,y,z, x,y,z]
- Type
- Float32Array
-
.tcoords - Texture coordinates [u,v, u,v, u,v, u,v]
- Type
- Float32Array
-
tileCount()
-
Gets the total number of tiles in the layout.
- Source:
Returns:
Number of tile descriptors
- Type
- number
Type Definitions
-
Type
-
Supported image layout types including both single-resolution and multi-resolution formats.
- image: Standard web image formats (jpg, png, gif, etc.)
- deepzoom: Microsoft Deep Zoom format with root tile > 1px
- deepzoom1px: Microsoft Deep Zoom format with 1px root tile
- google: Google Maps tiling scheme
- zoomify: Zoomify tiling format
- iiif: International Image Interoperability Framework
- iip: Internet Imaging Protocol
- tarzoom: OpenLIME custom format (single TAR of DeepZoom pyramid)
- itarzoom: OpenLIME custom interleaved TAR format
Type:
- 'image' | 'deepzoom' | 'deepzoom1px' | 'google' | 'zoomify' | 'iiif' | 'iip' | 'tarzoom' | 'itarzoom'
- Inherited From:
- Overrides:
- Source:
Events
-
ready
-
The event is fired when a layout is ready to be drawn(the single-resolution image is downloaded or the multi-resolution structure has been initialized).
- Inherited From:
- Overrides:
- Source:
-
updateSize
-
The event is fired when a layout size is modified (and the scene extension must be recomputed at canvas level).
- Inherited From:
- Overrides:
- Source: