public class TileLoader
extends java.lang.Object
implements java.lang.Runnable
AbstractMapDisplay
(caching) and Java2DMapDisplay
(rendering).Modifier and Type | Field and Description |
---|---|
protected Coordinate |
coordinate
The actual coordinates of the tile to load.
|
protected TileLoaderListener |
listener
The listener to call method after tile has been loaded.
|
protected processing.core.PApplet |
p
The parent applet.
|
protected AbstractMapProvider |
provider
The tile provider.
|
boolean |
showDebugBorder
Shows coordinate information for tile, i.e.
|
boolean |
showTileCoordinates |
boolean |
tryAgainOnNonLoadedTiles |
Constructor and Description |
---|
TileLoader(processing.core.PApplet p,
AbstractMapProvider provider,
TileLoaderListener listener,
Coordinate coordinate) |
Modifier and Type | Method and Description |
---|---|
protected processing.core.PImage |
getTileFromCacheOrUrl(java.lang.String[] urls) |
protected processing.core.PImage |
getTileFromUrl(java.lang.String[] urls)
Loads tile from URL(s) by using Processing's loadImage function.
|
void |
run()
Gets tile from provider, and calls
TileLoaderListener.tileLoaded(Coordinate, Object) afterwards. |
void |
showDebugBorder() |
void |
showTileCoordinates() |
public boolean showDebugBorder
public boolean showTileCoordinates
public boolean tryAgainOnNonLoadedTiles
protected processing.core.PApplet p
protected AbstractMapProvider provider
protected TileLoaderListener listener
protected Coordinate coordinate
public TileLoader(processing.core.PApplet p, AbstractMapProvider provider, TileLoaderListener listener, Coordinate coordinate)
public void run()
TileLoaderListener.tileLoaded(Coordinate, Object)
afterwards.run
in interface java.lang.Runnable
protected processing.core.PImage getTileFromCacheOrUrl(java.lang.String[] urls)
protected processing.core.PImage getTileFromUrl(java.lang.String[] urls)
urls
- The URLs (local or remote) to load the tiles from.public void showDebugBorder()
public void showTileCoordinates()