function checkZoom(hfov) {
        // Find optimal level
        var newLevel = 1;
        while ( newLevel < image.maxLevel &&
            gl.drawingBufferWidth > image.tileResolution *
            Math.pow(2, newLevel - 1) * Math.tan(hfov / 2) * 0.707 ) {
            newLevel++;
        }
        
        // Apply change
        program.level = newLevel;
    }
function checkZoom(hfov) {
        // Find optimal level
        var newLevel = 1;
        while ( newLevel < image.maxLevel &&
            gl.drawingBufferWidth > image.tileResolution *
            Math.pow(2, newLevel - 1) * Math.tan(hfov / 2) * 0.707 ) {
            newLevel++;
        }
        
        // Apply change
        program.level = newLevel;
    }
function checkZoom ( hfov ) { // Find optimal level var newLevel = 1 ; while ( newLevel < image . maxLevel && gl . drawingBufferWidth > image . tileResolution * Math . pow ( 2 , newLevel - 1 ) * Math . tan ( hfov / 2 ) * 0.707 ) { newLevel ++ ; } // Apply change program . level = newLevel ; }
Finds and applies optimal multires zoom level.
@private
@param {number} hfov - Horizontal field of view to check at.
Finds and applies optimal multires zoom level .