Closed frankowskid closed 11 years ago
Will add as todo. Thanks for the feedback.
Here is a patch:
CUT-HERE
From 8298948ae0f25c271c7072297b94bcac5460697b Mon Sep 17 00:00:00 2001 From: frankowski_d frankowski_d@poczta.onet.pl Date: Thu, 21 Mar 2013 20:02:13 +0100 Subject: [PATCH] fix for #26
src/com/qozix/mapview/zoom/ZoomLevel.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/com/qozix/mapview/zoom/ZoomLevel.java b/src/com/qozix/mapview/zoom/ZoomLevel.java
index 0798686..ec2ee4b 100644
--- a/src/com/qozix/mapview/zoom/ZoomLevel.java
+++ b/src/com/qozix/mapview/zoom/ZoomLevel.java
@@ -15,7 +15,7 @@ public class ZoomLevel implements Comparable
private long area;
private int rowCount;
private int columnCount;
@@ -37,7 +37,7 @@ public class ZoomLevel implements Comparable
area = (long)mapWidth * mapHeight;
}
public LinkedList
public long getArea() { return area; }
@Override public int compareTo( ZoomLevel o ) {
return getArea() - o.getArea() < 0 ? -1 : 1;
}
1.7.10.4
awesome, thanks - i'll incorporate in next update (hopefully next week)
Zoom levels are sorted by area ( mapWidth*mapHeight). The result for huge maps does not fit into integer. E.g square map which is larger than 46341px.