projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fda93af
)
AltosSiteMapTile: adjust centering calculation
author
Anthony Towns
<aj@erisian.com.au>
Fri, 19 Nov 2010 03:17:29 +0000
(13:17 +1000)
committer
Anthony Towns
<aj@erisian.com.au>
Fri, 19 Nov 2010 03:17:29 +0000
(13:17 +1000)
ao-tools/altosui/AltosSiteMapTile.java
patch
|
blob
|
history
diff --git
a/ao-tools/altosui/AltosSiteMapTile.java
b/ao-tools/altosui/AltosSiteMapTile.java
index 919de825dcfcd476b1f7de0cd5f9312085faaad8..6f5ddede5770f8e5e2b9b86916bbab2a3e6a0bca 100644
(file)
--- 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);