A subclass of Seadragon.TileSource that handles Deep Zoom Images. This class supports sparse images.
| Signature | Description |
|---|---|
| Seadragon.DziTileSource(width, height, tileSize, tileOverlap, tilesUrl, fileFormat, displayRects?) | Creates a DziTileSource for a Deep Zoom Image having tiles of the given format at the given URL. If the image is sparse, the image's display rectangles should be given as a list of Seadragon.DisplayRect instances. |
| Name | Type | Description |
|---|---|---|
| fileFormat | String | The file format used by this Deep Zoom Image. |
| displayRects | Array | If this image is sparse, the Seadragon.DisplayRect instances given to the constructor, otherwise null. |
| Name and Signature | Return Type | Description |
|---|---|---|
| getTileUrl(level, x, y) | String | Returns the URL for the given tile. |
| tileExists(level, x, y) | Boolean | Returns true if the given tile exists and is part of the sparse image. |
| Name and Signature | Return Type | Description |
|---|---|---|
| createFromXml(xmlUrl, xmlString?, callback?) | Seadragon.DziTileSource |
Creates a new Seadragon.DziTileSource from the XML file at the given URL. If the contents
of the XML are given, the XML is not actually downloaded; otherwise, it is.
(The location of the XML is needed in either case to determine the location of the
tiles.) If a callback function is given, the XML is loaded/parsed asynchronously, and the Seadragon.DziTileSource is passed as the sole parameter to the callback upon completion. Otherwise, the XML is loaded/parsed synchronously and the Seadragon.DziTileSource is returned by this method. If the XML fails to load/parse and a callback function was given, null is passed to the callback along with an optional error message as a second parameter. If the XML fails to load/parse and no callback function was given, an error is thrown. |