code: function( level ) {
  
          if(this.emulateLegacyImagePyramid) {
              return $.TileSource.prototype.getTileHeight.call(this, level);
          }
  
          var scaleFactor = Math.pow(2, this.maxLevel - level);
  
          if (this.tileSizePerScaleFactor && this.tileSizePerScaleFactor[scaleFactor]) {
              return this.tileSizePerScaleFactor[scaleFactor].height;
          }
          return this._tileHeight;
      }
docs: Return the tileHeight for the given level.
  @function
  @param {Number} level