gwt: stop tile loading when state is not 'loading'
This commit is contained in:
parent
818ea0b0c7
commit
1a521d2ad4
@ -64,6 +64,12 @@ public class UrlTileDataSource implements ITileDataSource {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void continueLoading() {
|
public void continueLoading() {
|
||||||
|
if (!mTile.state(MapTile.State.LOADING)) {
|
||||||
|
mConn.requestCompleted();
|
||||||
|
mSink.completed(FAILED);
|
||||||
|
mTile = null;
|
||||||
|
mSink = null;
|
||||||
|
}
|
||||||
boolean win = false;
|
boolean win = false;
|
||||||
if (is != null) {
|
if (is != null) {
|
||||||
try {
|
try {
|
||||||
|
@ -80,8 +80,13 @@ public abstract class BitmapTileSource extends UrlTileSource {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void continueLoading() {
|
public void continueLoading() {
|
||||||
sink.setTileImage(new GwtBitmap(img));
|
if (!tile.state(MapTile.State.LOADING)) {
|
||||||
sink.completed(SUCCESS);
|
sink.completed(FAILED);
|
||||||
|
RootPanel.get().remove(img);
|
||||||
|
} else {
|
||||||
|
sink.setTileImage(new GwtBitmap(img));
|
||||||
|
sink.completed(SUCCESS);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user