public abstract class AbstractTileFactory extends TileFactory
AbstractTileFactory provides
a basic implementation for the TileFactory.| Constructor and Description |
|---|
AbstractTileFactory(TileFactoryInfo info)
Creates a new instance of DefaultTileFactory using the spcified TileFactoryInfo
|
| Modifier and Type | Method and Description |
|---|---|
protected Runnable |
createTileRunner(Tile tile)
Subclasses can override this if they need custom TileRunners for some reason
|
void |
dispose()
Disposes this TileFactory
|
protected ExecutorService |
getService()
Subclasses may override this method to provide their own executor services.
|
Tile |
getTile(int x,
int y,
int zoom)
Returns the tile that is located at the given tilePoint
for this zoom.
|
TileCache |
getTileCache() |
void |
promote(Tile tile)
Increase the priority of this tile so it will be loaded sooner.
|
void |
setThreadPoolSize(int size)
Set the number of threads to use for loading the tiles.
|
void |
setTileCache(TileCache cache) |
protected void |
startLoading(Tile tile)
Override this method to load the tile using, for example, an
ExecutorService. |
addTileListener, fireTileLoadedEvent, geoToPixel, getInfo, getMapSize, getTileSize, pixelToGeo, removeTileListenerpublic AbstractTileFactory(TileFactoryInfo info)
info - a TileFactoryInfo to configure this TileFactorypublic Tile getTile(int x, int y, int zoom)
getTile in class TileFactoryx - the x valuey - the y valuezoom - the current zoom levelpublic TileCache getTileCache()
public void setTileCache(TileCache cache)
cache - the tile cacheprotected ExecutorService getService()
public void dispose()
TileFactorydispose in class TileFactorypublic void setThreadPoolSize(int size)
size - the thread pool sizeprotected void startLoading(Tile tile)
TileFactoryExecutorService.startLoading in class TileFactorytile - The tile to load.protected Runnable createTileRunner(Tile tile)
tile - the tile (unused!)public void promote(Tile tile)
tile - the tileCopyright © 2014. All Rights Reserved.