X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosuilib%2FAltosUIMapTile.java;h=8b6a8f0a3862a3f49f0946fc6382fe0daae1822e;hp=6fbcdb4b69c9e77ebf1c8163f8be6a3ad98d5df8;hb=c8078d352a7f54a4a97d25af080155d3f875536a;hpb=db2443fdbf65b65703217174303027c439124a83 diff --git a/altosuilib/AltosUIMapTile.java b/altosuilib/AltosUIMapTile.java index 6fbcdb4b..8b6a8f0a 100644 --- a/altosuilib/AltosUIMapTile.java +++ b/altosuilib/AltosUIMapTile.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_3; import java.awt.*; import java.awt.image.*; @@ -25,7 +25,7 @@ import java.awt.geom.*; import java.io.*; import java.util.*; import java.awt.RenderingHints.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; public class AltosUIMapTile { AltosUIMapTileListener listener; @@ -34,6 +34,7 @@ public class AltosUIMapTile { int zoom; int maptype; AltosUIMapStore store; + AltosUIMapCache cache; int status; private File map_file() { @@ -153,7 +154,7 @@ public class AltosUIMapTile { ++painting_serial; if (image == null && t.has_location()) - image = AltosUIMapCache.get(this, store, px_size, px_size); + image = cache.get(this, store, px_size, px_size); paint_graphics(g2d, t, painting_serial); } @@ -173,6 +174,7 @@ public class AltosUIMapTile { public AltosUIMapTile(AltosUIMapTileListener listener, AltosUILatLon upper_left, AltosUILatLon center, int zoom, int maptype, int px_size, Font font) { this.listener = listener; this.upper_left = upper_left; + cache = listener.cache(); while (center.lon < -180.0) center.lon += 360.0;