Calculate the number of zoom levels using maximum rather than minimum dimension.
Merge remote-tracking branch 'upstream/master'
Merge remote-tracking branch 'upstream/master'
Merge pull request #556 from perlman/master

Calculate the number of zoom levels using max rather than min dimension.