remove MapTile.loader field for GWT
This commit is contained in:
parent
26846d752f
commit
6d3bc0caea
@ -14,9 +14,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.oscim.layers.tile;
|
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.Gdx;
|
||||||
import com.badlogic.gdx.utils.Timer;
|
import com.badlogic.gdx.utils.Timer;
|
||||||
|
|
||||||
@ -86,7 +83,6 @@ public abstract class TileLoader {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
tile.loader = this;
|
|
||||||
executeJob(tile);
|
executeJob(tile);
|
||||||
|
|
||||||
mWorking = true;
|
mWorking = true;
|
||||||
|
@ -73,10 +73,7 @@ public class BitmapTileLoader extends TileLoader implements ITileDataSink {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void completed(boolean success) {
|
public void completed(boolean success) {
|
||||||
if (success) {
|
jobCompleted(mTile, success);
|
||||||
mTile.loader.jobCompleted(mTile, true);
|
|
||||||
mTile = null;
|
mTile = null;
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,11 +130,8 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void completed(boolean success) {
|
public void completed(boolean success) {
|
||||||
if (success) {
|
jobCompleted(mTile, success);
|
||||||
mTile.loader.jobCompleted(mTile, true);
|
|
||||||
mTile = null;
|
mTile = null;
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static int getValidLayer(int layer) {
|
protected static int getValidLayer(int layer) {
|
||||||
|
@ -73,7 +73,7 @@ public abstract class BitmapTileSource extends UrlTileSource {
|
|||||||
img.addLoadHandler(new LoadHandler() {
|
img.addLoadHandler(new LoadHandler() {
|
||||||
public void onLoad(LoadEvent event) {
|
public void onLoad(LoadEvent event) {
|
||||||
sink.setTileImage(new GwtBitmap(img));
|
sink.setTileImage(new GwtBitmap(img));
|
||||||
tile.loader.jobCompleted(tile, true);
|
sink.completed(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ public abstract class BitmapTileSource extends UrlTileSource {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(ErrorEvent event) {
|
public void onError(ErrorEvent event) {
|
||||||
tile.loader.jobCompleted(tile, false);
|
sink.completed(false);
|
||||||
RootPanel.get().remove(img);
|
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 static final class State {
|
||||||
public final static byte NONE = 0;
|
public final static byte NONE = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user