public class TileRepository extends java.lang.Object implements TileProvideable
Constructor and Description |
---|
TileRepository(TileSource source) |
Modifier and Type | Method and Description |
---|---|
TileLoadStrategy |
getStrategy() |
Tile |
getTile(int tilex,
int tiley,
int zoom)
Returns the tile for x, y and zoom.
|
TileSource |
getTileSource() |
void |
setExpire(long expire)
Set the time difference when a image in the cache expires.
|
void |
setStrategy(TileLoadStrategy strategy) |
void |
setTileSource(TileSource tileSource) |
public TileRepository(TileSource source)
public Tile getTile(int tilex, int tiley, int zoom)
TileProvideable
getTile
in interface TileProvideable
tilex
- x position of the tiletiley
- y position of the tilezoom
- the zoom levelTile
or null if arguments are invalid.public TileLoadStrategy getStrategy()
getStrategy
in interface TileProvideable
public final void setStrategy(TileLoadStrategy strategy)
setStrategy
in interface TileProvideable
public TileSource getTileSource()
getTileSource
in interface TilesSourceAccessable
public void setTileSource(TileSource tileSource)
setTileSource
in interface TilesSourceAccessable
public void setExpire(long expire)
expire
- difference as long