X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosuilib%2FAltosUIMapNew.java;h=a90e8c91ae76f9c9387db39db1a47a2b646956c7;hp=c867bf2e1ba2dcbe6aab3a72e94060f0cac57e6b;hb=e0081f7ba6fc9f1e4484d3e291fd30065ad5b620;hpb=13179f614a99cad3016832ac1b365eaa4208c10f 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() {