Class: ImageLoader

OpenSeadragon.ImageLoader

Handles downloading of a set of images using asynchronous queue pattern. You generally won't have to interact with the ImageLoader directly.

Constructor

new ImageLoader(options)

Parameters:
Name Type Description
options Object Options for this ImageLoader.
Properties
Name Type Attributes Description
jobLimit Number <optional>
The number of concurrent image requests. See imageLoaderLimit in OpenSeadragon.Options for details.
timeout Number <optional>
The max number of milliseconds that an image job may take to complete.
Source:

Methods

addJob(options)

Add an unloaded image to the loader queue.
Parameters:
Name Type Description
options Object Options for this job.
Properties
Name Type Attributes Description
src String <optional>
URL of image to download.
tile Tile <optional>
Tile that belongs the data to. The tile instance is not internally used and serves for custom TileSources implementations.
source TileSource <optional>
Image loading strategy
loadWithAjax String <optional>
Whether to load this image with AJAX.
ajaxHeaders String <optional>
Headers to add to the image request if using AJAX.
crossOriginPolicy String | Boolean <optional>
CORS policy to use for downloads
postData String <optional>
POST parameters (usually but not necessarily in k=v&k2=v2... form, see TileSource::getPostData) or null
ajaxWithCredentials Boolean <optional>
Whether to set withCredentials on AJAX requests.
callback function <optional>
Called once image has been downloaded.
abort function <optional>
Called when this image job is aborted.
Source:

clear()

Clear any unstarted image loading jobs from the queue.
Source: