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