+
+ /**
+ * Callback method from TileDownloader to let us know that an image has been loaded
+ * @param inTile Loaded Image object
+ * @param inLayer layer index from 0
+ * @param inX x coordinate of tile
+ * @param inY y coordinate of tile
+ * @param inZoom zoom level of loaded image
+ */
+ public void notifyImageLoaded(Image inTile, int inLayer, int inX, int inY, int inZoom)
+ {
+ if (inTile != null)
+ {
+ MemTileCacher tempCache = _tempCaches[inLayer]; // Should probably guard against nulls and array indexes here
+ if (tempCache.getTile(inX, inY) == null)
+ {
+ // Check with cache that the zoom level is still valid
+ tempCache.setTile(inTile, inX, inY, inZoom);
+ inTile.getWidth(this); // trigger imageUpdate when image is ready
+ }
+ }
+ }