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
|
||||
public void continueLoading() {
|
||||
if (!mTile.state(MapTile.State.LOADING)) {
|
||||
mConn.requestCompleted();
|
||||
mSink.completed(FAILED);
|
||||
mTile = null;
|
||||
mSink = null;
|
||||
}
|
||||
boolean win = false;
|
||||
if (is != null) {
|
||||
try {
|
||||
|
@ -80,8 +80,13 @@ public abstract class BitmapTileSource extends UrlTileSource {
|
||||
|
||||
@Override
|
||||
public void continueLoading() {
|
||||
sink.setTileImage(new GwtBitmap(img));
|
||||
sink.completed(SUCCESS);
|
||||
if (!tile.state(MapTile.State.LOADING)) {
|
||||
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