remove MapTile.loader field for GWT
This commit is contained in:
parent
26846d752f
commit
6d3bc0caea
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user