public class TileManager
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
TileManager.Listener |
| Modifier and Type | Field and Description |
|---|---|
EventDispatcher<TileManager.Listener,MapTile> |
events |
static Event |
TILE_LOADED |
static Event |
TILE_REMOVED |
| Constructor and Description |
|---|
TileManager(Map map,
int cacheLimit) |
| Modifier and Type | Method and Description |
|---|---|
void |
addZoomLimit(int zoomLimit)
Allow loading tiles at specified zoom if higher zoom levels are requested.
|
void |
clearJobs() |
boolean |
getActiveTiles(TileSet tileSet)
Retrieve a TileSet of current tiles.
|
MapTile |
getTile(int tileX,
int tileY,
byte zoomLevel) |
MapTile |
getTile(int x,
int y,
int z) |
MapTile |
getTileJob() |
boolean |
hasTileJobs() |
void |
init() |
void |
jobCompleted(MapTile tile,
QueryResult result)
Called by TileLoader thread when tile is loaded.
|
void |
removeZoomLimit(int zoomLimit)
Remove zoom limit.
|
void |
setZoomLevel(int zoomLevelMin,
int zoomLevelMax) |
void |
setZoomTable(int[] zoomTable) |
void |
setZoomThresholds(float down,
float up)
TESTING: avoid flickering when switching zoom-levels:
1.85, 1.15 seems to work well
|
boolean |
update(MapPosition pos)
1.
|
public static final Event TILE_LOADED
public static final Event TILE_REMOVED
public final EventDispatcher<TileManager.Listener,MapTile> events
public TileManager(Map map, int cacheLimit)
public void setZoomTable(int[] zoomTable)
public void setZoomThresholds(float down,
float up)
public MapTile getTile(int x, int y, int z)
public void init()
public boolean update(MapPosition pos)
pos - current MapPositionpublic void clearJobs()
public boolean hasTileJobs()
public MapTile getTileJob()
public boolean getActiveTiles(TileSet tileSet)
tileSet - to be updatedpublic void jobCompleted(MapTile tile, QueryResult result)
tile - Tile ready for upload in TileRenderLayerpublic MapTile getTile(int tileX, int tileY, byte zoomLevel)
public void setZoomLevel(int zoomLevelMin,
int zoomLevelMax)
public void addZoomLimit(int zoomLimit)
public void removeZoomLimit(int zoomLimit)