summaryrefslogtreecommitdiff
path: root/altosui/AltosSiteMapCache.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-07-16 22:34:44 -0700
committerKeith Packard <keithp@keithp.com>2011-07-16 22:34:44 -0700
commit0a4d934f6e2914bfe2d965630543f029a1576c11 (patch)
tree4e8331d9c0edb19a10e8f9b5b6c6f949aadaca4d /altosui/AltosSiteMapCache.java
parentabb8510b97ce9cbbff0275cc31f74780fe1ce138 (diff)
altosui: Display full map preload area in view.
This involved fixing the map view to support arbitrary sizes, and then exposing a synchronous tile loading API so that the progress bar could be used to show tile loading progress. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosSiteMapCache.java')
-rw-r--r--altosui/AltosSiteMapCache.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/altosui/AltosSiteMapCache.java b/altosui/AltosSiteMapCache.java
index 2e62cc45..cfad52a9 100644
--- a/altosui/AltosSiteMapCache.java
+++ b/altosui/AltosSiteMapCache.java
@@ -37,6 +37,7 @@ public class AltosSiteMapCache extends JLabel {
try {
u = new URL(url);
} catch (java.net.MalformedURLException e) {
+ System.out.printf("Malformed URL '%s'\n", url);
return false;
}
@@ -57,9 +58,12 @@ public class AltosSiteMapCache extends JLabel {
in.close();
if (offset != contentLength) {
+ System.out.printf("Bad length %d != %d\n",
+ offset, contentLength);
return false;
}
} catch (IOException e) {
+ System.out.printf("IO exception reading URL\n");
return false;
}
@@ -69,11 +73,13 @@ public class AltosSiteMapCache extends JLabel {
out.flush();
out.close();
} catch (FileNotFoundException e) {
+ System.out.printf("Can't create file\n");
return false;
} catch (IOException e) {
if (file.exists()) {
file.delete();
}
+ System.out.printf("IO exception writing file\n");
return false;
}
return true;