do not cancel loading in limitCache for now
This commit is contained in:
parent
363cf8b029
commit
7ac44bc3df
@ -99,9 +99,6 @@ public class MapRenderer extends GLSurfaceView {
|
|||||||
|
|
||||||
public synchronized void updateMap(boolean clear) {
|
public synchronized void updateMap(boolean clear) {
|
||||||
|
|
||||||
if (mWidth == 0 || mHeight == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
boolean changedPos = false;
|
boolean changedPos = false;
|
||||||
boolean changedZoom = false;
|
boolean changedZoom = false;
|
||||||
|
|
||||||
@ -230,6 +227,8 @@ public class MapRenderer extends GLSurfaceView {
|
|||||||
|
|
||||||
int max = newTiles.tiles.length - 1;
|
int max = newTiles.tiles.length - 1;
|
||||||
|
|
||||||
|
boolean prefetchChildren = true;
|
||||||
|
|
||||||
for (int yy = tileTop; yy <= tileBottom; yy++) {
|
for (int yy = tileTop; yy <= tileBottom; yy++) {
|
||||||
for (int xx = tileLeft; xx <= tileRight; xx++) {
|
for (int xx = tileLeft; xx <= tileRight; xx++) {
|
||||||
|
|
||||||
@ -247,6 +246,10 @@ public class MapRenderer extends GLSurfaceView {
|
|||||||
|
|
||||||
newTiles.tiles[tiles++] = tile;
|
newTiles.tiles[tiles++] = tile;
|
||||||
|
|
||||||
|
if (prefetchChildren) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (!(tile.isLoading || tile.newData || tile.isReady)) {
|
if (!(tile.isLoading || tile.newData || tile.isReady)) {
|
||||||
mJobList.add(tile);
|
mJobList.add(tile);
|
||||||
}
|
}
|
||||||
@ -399,13 +402,13 @@ public class MapRenderer extends GLSurfaceView {
|
|||||||
|
|
||||||
mTiles.add(t);
|
mTiles.add(t);
|
||||||
|
|
||||||
} else if (t.isLoading) {
|
// } else if (t.isLoading) {
|
||||||
// FIXME if we add tile back on next limit cache
|
// // FIXME if we add tile back on next limit cache
|
||||||
// this will be removed. clearTile could interfere with
|
// // this will be removed. clearTile could interfere with
|
||||||
// MapGenerator... clear in passTile().
|
// // MapGenerator... clear in passTile().
|
||||||
Log.d(TAG, "X cancel loading " + t + " " + t.distance);
|
// Log.d(TAG, "X cancel loading " + t + " " + t.distance);
|
||||||
t.isLoading = false;
|
// t.isLoading = false;
|
||||||
// mTiles.add(t);
|
// // mTiles.add(t);
|
||||||
} else {
|
} else {
|
||||||
clearTile(t);
|
clearTile(t);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user