diff options
Diffstat (limited to 'altosuilib')
-rw-r--r-- | altosuilib/AltosUIMapNew.java | 18 | ||||
-rw-r--r-- | altosuilib/AltosUIMapPreloadNew.java | 9 |
2 files changed, 12 insertions, 15 deletions
diff --git a/altosuilib/AltosUIMapNew.java b/altosuilib/AltosUIMapNew.java index c867bf2e..a90e8c91 100644 --- a/altosuilib/AltosUIMapNew.java +++ b/altosuilib/AltosUIMapNew.java @@ -241,8 +241,8 @@ public class AltosUIMapNew extends JComponent implements AltosFlightDisplay, Alt } class MapTile extends AltosMapTile { - public MapTile(AltosMapTileListener listener, AltosLatLon upper_left, AltosLatLon center, int zoom, int maptype, int px_size) { - super(listener, upper_left, center, zoom, maptype, px_size); + public MapTile(AltosMapCache cache, AltosLatLon upper_left, AltosLatLon center, int zoom, int maptype, int px_size) { + super(cache, upper_left, center, zoom, maptype, px_size); } public void paint(AltosMapTransform t) { @@ -254,11 +254,9 @@ public class AltosUIMapNew extends JComponent implements AltosFlightDisplay, Alt if (!g.hitClip(point.x, point.y, px_size, px_size)) return; - AltosImage altos_image = cache.get(this, store, px_size, px_size); - + AltosImage altos_image = get_image(); AltosUIImage ui_image = (AltosUIImage) altos_image; - - Image image = null; + Image image = null; if (ui_image != null) image = ui_image.image; @@ -272,8 +270,8 @@ public class AltosUIMapNew extends JComponent implements AltosFlightDisplay, Alt if (t.has_location()) { String message = null; switch (status) { - case AltosMapTile.loading: - message = "Loading..."; + case AltosMapTile.fetching: + message = "Fetching..."; break; case AltosMapTile.bad_request: message = "Internal error"; @@ -334,8 +332,8 @@ public class AltosUIMapNew extends JComponent implements AltosFlightDisplay, Alt return new MapMark(lat, lon, state); } - public AltosMapTile new_tile(AltosMapTileListener listener, AltosLatLon upper_left, AltosLatLon center, int zoom, int maptype, int px_size) { - return new MapTile(listener, upper_left, center, zoom, maptype, px_size); + public AltosMapTile new_tile(AltosMapCache cache, AltosLatLon upper_left, AltosLatLon center, int zoom, int maptype, int px_size) { + return new MapTile(cache, upper_left, center, zoom, maptype, px_size); } public int width() { diff --git a/altosuilib/AltosUIMapPreloadNew.java b/altosuilib/AltosUIMapPreloadNew.java index b5f4dbf8..3269bbdd 100644 --- a/altosuilib/AltosUIMapPreloadNew.java +++ b/altosuilib/AltosUIMapPreloadNew.java @@ -127,8 +127,6 @@ public class AltosUIMapPreloadNew extends AltosUIFrame implements ActionListener JProgressBar pbar; - AltosMapLoader loader; - JLabel site_list_label; JComboBox<AltosLaunchSite> site_list; @@ -238,7 +236,10 @@ public class AltosUIMapPreloadNew extends AltosUIFrame implements ActionListener r = r * 1000; loading = true; - loader.load(latitude, longitude, min_z, max_z, r, all_types()); + new AltosMapLoader(map.map, this, + latitude, longitude, + min_z, max_z, r, all_types()); + } catch (ParseException pe) { load_button.setSelected(false); } @@ -271,8 +272,6 @@ public class AltosUIMapPreloadNew extends AltosUIFrame implements ActionListener map = new AltosUIMapNew(); - loader = new AltosMapLoader(map.map, this); - c.fill = GridBagConstraints.BOTH; c.anchor = GridBagConstraints.CENTER; c.insets = i; |