Skip to content

Commit 88e6f0e

Browse files
committed
Fix level width and height calculation in case of non-full sphere level set sector used.
1 parent 46989e2 commit 88e6f0e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • worldwind/src/main/java/gov/nasa/worldwind/util

worldwind/src/main/java/gov/nasa/worldwind/util/Level.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ public Level(LevelSet parent, int levelNumber, double tileDelta) {
6767

6868
this.parent = parent;
6969
this.levelNumber = levelNumber;
70-
this.levelWidth = (int) Math.round(parent.tileWidth * 360 / tileDelta);
71-
this.levelHeight = (int) Math.round(parent.tileHeight * 180 / tileDelta);
70+
this.levelWidth = (int) Math.round(parent.tileWidth * parent.sector.deltaLongitude() / tileDelta);
71+
this.levelHeight = (int) Math.round(parent.tileHeight * parent.sector.deltaLatitude() / tileDelta);
7272
this.tileDelta = tileDelta;
7373
this.tileWidth = parent.tileWidth;
7474
this.tileHeight = parent.tileHeight;

0 commit comments

Comments
 (0)