org.oscim.layers.tile.LoadDelayTask Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vtm-web Show documentation
Show all versions of vtm-web Show documentation
OpenGL vector map library written in Java - running on Android, iOS, Desktop and within the browser.
package org.oscim.layers.tile;
import com.badlogic.gdx.Gdx;
import org.oscim.renderer.MapRenderer;
import org.oscim.tiling.ITileDataSink;
public abstract class LoadDelayTask implements Runnable {
protected final MapTile tile;
protected final ITileDataSink sink;
protected final T data;
public LoadDelayTask(MapTile tile, ITileDataSink sink, T data) {
this.tile = tile;
this.sink = sink;
this.data = data;
}
@Override
public void run() {
if (MapRenderer.frametime == TileLoader.lastLoadTime) {
Gdx.app.postRunnable(this);
return;
}
continueLoading();
}
public abstract void continueLoading();
}