diff options
Diffstat (limited to 'main/src/cgeo/geocaching/connector/gc/Tile.java')
| -rw-r--r-- | main/src/cgeo/geocaching/connector/gc/Tile.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/main/src/cgeo/geocaching/connector/gc/Tile.java b/main/src/cgeo/geocaching/connector/gc/Tile.java index 3177f2c..4ed53c9 100644 --- a/main/src/cgeo/geocaching/connector/gc/Tile.java +++ b/main/src/cgeo/geocaching/connector/gc/Tile.java @@ -50,7 +50,7 @@ public class Tile { private final int tileX; private final int tileY; - private final int zoomlevel; + private final int zoomLevel; private final Viewport viewPort; public Tile(Geopoint origin, int zoomlevel) { @@ -59,7 +59,7 @@ public class Tile { private Tile(int tileX, int tileY, int zoomlevel) { - this.zoomlevel = clippedZoomlevel(zoomlevel); + this.zoomLevel = clippedZoomlevel(zoomlevel); this.tileX = tileX; this.tileY = tileY; @@ -67,8 +67,8 @@ public class Tile { viewPort = new Viewport(getCoord(new UTFGridPosition(0, 0)), getCoord(new UTFGridPosition(63, 63))); } - public int getZoomlevel() { - return zoomlevel; + public int getZoomLevel() { + return zoomLevel; } private static int clippedZoomlevel(int zoomlevel) { @@ -120,14 +120,14 @@ public class Tile { double pixX = tileX * TILE_SIZE + pos.x * 4; double pixY = tileY * TILE_SIZE + pos.y * 4; - double lonDeg = ((360.0 * pixX) / NUMBER_OF_PIXELS[this.zoomlevel]) - 180.0; - double latRad = Math.atan(Math.sinh(Math.PI * (1 - 2 * pixY / NUMBER_OF_PIXELS[this.zoomlevel]))); + double lonDeg = ((360.0 * pixX) / NUMBER_OF_PIXELS[this.zoomLevel]) - 180.0; + double latRad = Math.atan(Math.sinh(Math.PI * (1 - 2 * pixY / NUMBER_OF_PIXELS[this.zoomLevel]))); return new Geopoint(Math.toDegrees(latRad), lonDeg); } @Override public String toString() { - return String.format(Locale.US, "(%d/%d), zoom=%d", tileX, tileY, zoomlevel); + return String.format(Locale.US, "(%d/%d), zoom=%d", tileX, tileY, zoomLevel); } /** @@ -225,7 +225,7 @@ public class Tile { } return (this.tileX == ((Tile) o).tileX) && (this.tileY == ((Tile) o).tileY) - && (this.zoomlevel == ((Tile) o).zoomlevel); + && (this.zoomLevel == ((Tile) o).zoomLevel); } @Override |
