cancel loading when tile is removed from cache

This commit is contained in:
Hannes Janetzek 2012-08-29 11:01:19 +02:00
parent 38e2b9296c
commit 78e39af35a

View File

@ -278,14 +278,12 @@ public class MapRenderer implements org.mapsforge.android.IMapRenderer {
synchronized (t) { synchronized (t) {
// dont remove tile used by renderthread or mapgenerator // dont remove tile used by renderthread or mapgenerator
// FIXME set tile loading state in main thread // FIXME set tile loading state in main thread
// if (t.isLoading) { if (t.isLoading) {
// Log.d(TAG, "cancel loading " + t + " " + (t.zoomLevel - mCurZ) Log.d(TAG, "cancel loading " + t + " " + (t.zoomLevel - mCurZ)
// + " " + (t.zoomLevel - mDrawZ) + " " + t.distance); + " " + (t.zoomLevel - mDrawZ) + " " + t.distance);
// t.isCanceled = true; t.isCanceled = true;
// } } else if (t.isActive || t.isLoading) {
// else Log.d(TAG, "X removing active " + t + " " + (t.zoomLevel - mCurZ)
if (t.isActive || t.isLoading) {
Log.d(TAG, "EEEK removing active " + t + " " + (t.zoomLevel - mCurZ)
+ " " + (t.zoomLevel - mDrawZ) + " " + t.distance); + " " + (t.zoomLevel - mDrawZ) + " " + t.distance);
mTileList.add(t); mTileList.add(t);
continue; continue;