remove MapTile.loader field for GWT

This commit is contained in:
Hannes Janetzek 2014-03-08 13:20:26 +01:00
parent 26846d752f
commit 6d3bc0caea
5 changed files with 7 additions and 20 deletions

View File

@ -14,9 +14,6 @@
*/
package org.oscim.layers.tile;
import org.oscim.layers.tile.MapTile;
import org.oscim.layers.tile.TileManager;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.utils.Timer;
@ -86,7 +83,6 @@ public abstract class TileLoader {
return;
try {
tile.loader = this;
executeJob(tile);
mWorking = true;

View File

@ -73,10 +73,7 @@ public class BitmapTileLoader extends TileLoader implements ITileDataSink {
@Override
public void completed(boolean success) {
if (success) {
mTile.loader.jobCompleted(mTile, true);
mTile = null;
return;
}
jobCompleted(mTile, success);
mTile = null;
}
}

View File

@ -130,11 +130,8 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
}
public void completed(boolean success) {
if (success) {
mTile.loader.jobCompleted(mTile, true);
mTile = null;
return;
}
jobCompleted(mTile, success);
mTile = null;
}
protected static int getValidLayer(int layer) {

View File

@ -73,7 +73,7 @@ public abstract class BitmapTileSource extends UrlTileSource {
img.addLoadHandler(new LoadHandler() {
public void onLoad(LoadEvent event) {
sink.setTileImage(new GwtBitmap(img));
tile.loader.jobCompleted(tile, true);
sink.completed(true);
}
});
@ -81,7 +81,7 @@ public abstract class BitmapTileSource extends UrlTileSource {
@Override
public void onError(ErrorEvent event) {
tile.loader.jobCompleted(tile, false);
sink.completed(false);
RootPanel.get().remove(img);
}
});

View File

@ -35,9 +35,6 @@ public class MapTile extends Tile {
}
/** To be removed: used by GWT backend */
public TileLoader loader;
public static final class State {
public final static byte NONE = 0;
@ -67,7 +64,7 @@ public class MapTile extends Tile {
}
public MapTile(TileNode node, int tileX, int tileY, int zoomLevel) {
super(tileX, tileY, (byte)zoomLevel);
super(tileX, tileY, (byte) zoomLevel);
this.x = (double) tileX / (1 << zoomLevel);
this.y = (double) tileY / (1 << zoomLevel);
this.node = node;