function providesCoverage(whichImage, level, x, y) {
        var i, j;
        if (!coverage[whichImage][level]) {
            return false;
        }
        if (x == null || y == null) {
            // Check that every visible tile provides coverage.
            var rowsOfColumns = coverage[whichImage][level];
            for (i in rowsOfColumns) {
                if (rowsOfColumns.hasOwnProperty(i)) {
                    var columns = rowsOfColumns[i];
                    for (j in columns) {
                        if (columns.hasOwnProperty(j) && !columns[j]) {
                            return false;
                        }
                    }
                }
            }
            return true;
        }
        return (coverage[whichImage][level][x] == null ||
            coverage[whichImage][level][x][y] == null ||
            coverage[whichImage][level][x][y]);
    }
/**
     * <p>Returns true if the given tile provides coverage to lower-level tiles of
     * lower resolution representing the same content. If neither x nor y is
     * given, returns true if the entire visible level provides coverage.
     *
     * <p>Note that out-of-bounds tiles provide coverage in this sense, since
     * there's no content that they would need to cover. Tiles at non-existent
     * levels that are within the image bounds, however, do not.
     *
     * <p>Coverage scheme: it's required that in the draw routine, coverage for
     * every tile within the viewport is initially explicitly set to false.
     * This way, if a given level's coverage has been initialized, and a tile
     * isn't found, it means it's offscreen and thus provides coverage (since
     * there's no content needed to be covered). And if every tile that is found
     * does provide coverage, the entire visible level provides coverage.
     *
     * @param {number} whichImage Index of an image in the <code>controller.tiledImage</code> table.
     * @param {number} level Tile's level.
     * @param {number} x Tile's column.
     * @param {number} y Tile's row.
     * @return {boolean}
     * @private
     */
Returns true if the given tile provides coverage to lower-level tiles of
lower resolution representing the same content. If neither x nor y is
given, returns true if the entire visible level provides coverage.

Note that out-of-bounds tiles provide coverage in this sense, since
there's no content that they would need to cover. Tiles at non-existent
levels that are within the image bounds, however, do not.

Coverage scheme: it's required that in the draw routine, coverage for
every tile within the viewport is initially explicitly set to false.
This way, if a given level's coverage has been initialized, and a tile
isn't found, it means it's offscreen and thus provides coverage (since
there's no content needed to be covered). And if every tile that is found
does provide coverage, the entire visible level provides coverage.

@param {number} whichImage Index of an image in the controller.tiledImage table.
@param {number} level Tile's level.
@param {number} x Tile's column.
@param {number} y Tile's row.
@return {boolean}
@private
Returns true if the given tile provides coverage to lower - level tiles of lower resolution representing the same content . If neither x nor y is given returns true if the entire visible level provides coverage . Note that out - of - bounds tiles provide coverage in this sense since there ' s no content that they would need to cover . Tiles at non - existent levels that are within the image bounds however do not . Coverage scheme : it ' s required that in the draw routine coverage for every tile within the viewport is initially explicitly set to false . This way if a given level ' s coverage has been initialized and a tile isn ' t found it means it ' s offscreen and thus provides coverage ( since there ' s no content needed to be covered ) . And if every tile that is found does provide coverage the entire visible level provides coverage . @param { number } whichImage Index of an image in the controller . tiledImage table . @param { number } level Tile ' s level . @param { number } x Tile ' s column . @param { number } y Tile ' s row . @return { boolean } @private
function providesCoverage(whichImage, level, x, y) {
        var i, j;
        if (!coverage[whichImage][level]) {
            return false;
        }
        if (x == null || y == null) {
            var rowsOfColumns = coverage[whichImage][level];
            for (i in rowsOfColumns) {
                if (rowsOfColumns.hasOwnProperty(i)) {
                    var columns = rowsOfColumns[i];
                    for (j in columns) {
                        if (columns.hasOwnProperty(j) && !columns[j]) {
                            return false;
                        }
                    }
                }
            }
            return true;
        }
        return (coverage[whichImage][level][x] == null ||
            coverage[whichImage][level][x][y] == null ||
            coverage[whichImage][level][x][y]);
    }
function providesCoverage ( whichImage , level , x , y ) { var i , j ; if ( ! coverage [ whichImage ] [ level ] ) { return false ; } if ( x == null || y == null ) { var rowsOfColumns = coverage [ whichImage ] [ level ] ; for ( i in rowsOfColumns ) { if ( rowsOfColumns . hasOwnProperty ( i ) ) { var columns = rowsOfColumns [ i ] ; for ( j in columns ) { if ( columns . hasOwnProperty ( j ) && ! columns [ j ] ) { return false ; } } } } return true ; } return ( coverage [ whichImage ] [ level ] [ x ] == null || coverage [ whichImage ] [ level ] [ x ] [ y ] == null || coverage [ whichImage ] [ level ] [ x ] [ y ] ) ; }
<p>Returns true if the given tile provides coverage to lower-level tiles of
 lower resolution representing the same content.
<p > Returns true if the given tile provides coverage to lower - level tiles of lower resolution representing the same content .
// Check that every visible tile provides coverage.