summaryrefslogtreecommitdiff
path: root/ao-tools
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2010-11-19 13:17:29 +1000
committerAnthony Towns <aj@erisian.com.au>2010-11-19 13:17:29 +1000
commitfa45336062523838ba8abb08427cdc4d9c7de7a8 (patch)
treec33646c3719bac95a7378df776476e0fbc724a10 /ao-tools
parentfda93afcd8aa4133b0e5f008b824d072e338d0ed (diff)
AltosSiteMapTile: adjust centering calculation
Diffstat (limited to 'ao-tools')
-rw-r--r--ao-tools/altosui/AltosSiteMapTile.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/ao-tools/altosui/AltosSiteMapTile.java b/ao-tools/altosui/AltosSiteMapTile.java
index 919de825..6f5ddede 100644
--- a/ao-tools/altosui/AltosSiteMapTile.java
+++ b/ao-tools/altosui/AltosSiteMapTile.java
@@ -52,8 +52,8 @@ public class AltosSiteMapTile extends JLabel {
if (coord_pt.y - north_1nm.y > px_size/2)
break;
}
- coord_pt.x = px_size/2 - ((long)coord_pt.x/px_size + off_x) * px_size;
- coord_pt.y = px_size/2 - ((long)coord_pt.y/px_size + off_y) * px_size;
+ coord_pt.x = -px_size * Math.floor(coord_pt.x/px_size + off_x);
+ coord_pt.y = -px_size * Math.floor(coord_pt.y/px_size + off_y);
scale_x = 256/360.0 * Math.pow(2, zoom);
scale_y = 256/(2.0*Math.PI) * Math.pow(2, zoom);