function raiseAddItemFailed( event ) {
            for (var i = 0; i < _this._loadQueue.length; i++) {
                if (_this._loadQueue[i] === myQueueItem) {
                    _this._loadQueue.splice(i, 1);
                    break;
                }
            }

            if (_this._loadQueue.length === 0) {
                refreshWorld(myQueueItem);
            }

             /**
             * Raised when an error occurs while adding a item.
             * @event add-item-failed
             * @memberOf OpenSeadragon.Viewer
             * @type {object}
             * @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
             * @property {String} message
             * @property {String} source
             * @property {Object} options The options passed to the addTiledImage method.
             * @property {?Object} userData - Arbitrary subscriber-defined object.
             */
            _this.raiseEvent( 'add-item-failed', event );

            if (options.error) {
                options.error(event);
            }
        }
Add a tiled image to the viewer.
options.tileSource can be anything that {@link OpenSeadragon.Viewer#open}
 supports except arrays of images.
Note that you can specify options.width or options.height, but not both.
The other dimension will be calculated according to the item's aspect ratio.
If collectionMode is on (see {@link OpenSeadragon.Options}), the new image is
automatically arranged with the others.
@function
@param {Object} options
@param {String|Object|Function} options.tileSource - The TileSource specifier.
A String implies a url used to determine the tileSource implementation
     based on the file extension of url. JSONP is implied by *.js,
     otherwise the url is retrieved as text and the resulting text is
     introspected to determine if its json, xml, or text and parsed.
An Object implies an inline configuration which has a single
     property sufficient for being able to determine tileSource
     implementation. If the object has a property which is a function
     named 'getTileUrl', it is treated as a custom TileSource.
@param {Number} [options.index] The index of the item. Added on top of
all other items if not specified.
@param {Boolean} [options.replace=false] If true, the item at options.index will be
removed and the new item is added in its place. options.tileSource will be
interpreted and fetched if necessary before the old item is removed to avoid leaving
a gap in the world.
@param {Number} [options.x=0] The X position for the image in viewport coordinates.
@param {Number} [options.y=0] The Y position for the image in viewport coordinates.
@param {Number} [options.width=1] The width for the image in viewport coordinates.
@param {Number} [options.height] The height for the image in viewport coordinates.
@param {OpenSeadragon.Rect} [options.fitBounds] The bounds in viewport coordinates
to fit the image into. If specified, x, y, width and height get ignored.
@param {OpenSeadragon.Placement} [options.fitBoundsPlacement=OpenSeadragon.Placement.CENTER]
How to anchor the image in the bounds if options.fitBounds is set.
@param {OpenSeadragon.Rect} [options.clip] - An area, in image pixels, to clip to
(portions of the image outside of this area will not be visible). Only works on
browsers that support the HTML5 canvas.
@param {Number} [options.opacity=1] Proportional opacity of the tiled images (1=opaque, 0=hidden)
@param {Boolean} [options.preload=false] Default switch for loading hidden images (true loads, false blocks)
@param {Boolean} [options.zombieCache] In the case that this method removes any TiledImage instance,
     allow the item-referenced cache to remain in memory even without active tiles. Default false.
@param {Number} [options.degrees=0] Initial rotation of the tiled image around
its top left corner in degrees.
@param {Boolean} [options.flipped=false] Whether to horizontally flip the image.
@param {String} [options.compositeOperation] How the image is composited onto other images.
@param {String} [options.crossOriginPolicy] The crossOriginPolicy for this specific image,
overriding viewer.crossOriginPolicy.
@param {Boolean} [options.ajaxWithCredentials] Whether to set withCredentials on tile AJAX
@param {Boolean} [options.loadTilesWithAjax]
     Whether to load tile data using AJAX requests.
     Defaults to the setting in {@link OpenSeadragon.Options}.
@param {Object} [options.ajaxHeaders]
     A set of headers to include when making tile AJAX requests.
     Note that these headers will be merged over any headers specified in {@link OpenSeadragon.Options}.
     Specifying a falsy value for a header will clear its existing value set at the Viewer level (if any).
@param {Function} [options.success] A function that gets called when the image is
successfully added. It's passed the event object which contains a single property:
"item", which is the resulting instance of TiledImage.
@param {Function} [options.error] A function that gets called if the image is
unable to be added. It's passed the error event object, which contains "message"
and "source" properties.
@param {Boolean} [options.collectionImmediately=false] If collectionMode is on,
specifies whether to snap to the new arrangement immediately or to animate to it.
@param {String|CanvasGradient|CanvasPattern|Function} [options.placeholderFillStyle] - See {@link OpenSeadragon.Options}.
@fires OpenSeadragon.World.event:add-item
@fires OpenSeadragon.Viewer.event:add-item-failed