From db08e99361d82de63058d3388823f486e5fc9839 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 27 May 2014 10:58:53 -0700 Subject: altosuilib: Add multiple zoom levels and content types to map Also changes the file format for hybrid, satellite and terrain maps to jpg to save disk space. Signed-off-by: Keith Packard --- altosuilib/AltosSiteMapPreload.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'altosuilib/AltosSiteMapPreload.java') diff --git a/altosuilib/AltosSiteMapPreload.java b/altosuilib/AltosSiteMapPreload.java index baa7fc37..107b09f8 100644 --- a/altosuilib/AltosSiteMapPreload.java +++ b/altosuilib/AltosSiteMapPreload.java @@ -265,9 +265,10 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener public void run() { for (int y = -map.radius; y <= map.radius; y++) { for (int x = -map.radius; x <= map.radius; x++) { - String pngfile; - pngfile = map.initMap(new Point(x,y)); - SwingUtilities.invokeLater(new updatePbar(x, y, pngfile)); + File pngfile; + pngfile = map.init_map(new Point(x,y), + AltosSiteMap.load_mode_cached|AltosSiteMap.load_mode_uncached); + SwingUtilities.invokeLater(new updatePbar(x, y, pngfile.toString())); } } } @@ -305,6 +306,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener try { final double latitude = lat.get_value(); final double longitude = lon.get_value(); + map.clear_base_location(); map.setBaseLocation(latitude,longitude); map.draw_circle(latitude,longitude); loading = true; -- cgit v1.2.3