protected class AbstractTileSourceLayer.TileSet extends TileRange
Modifier and Type | Field and Description |
---|---|
private AbstractTileSourceLayer.TileSetInfo |
info |
Modifier | Constructor and Description |
---|---|
private |
TileSet()
null tile set
|
protected |
TileSet(TileRange range) |
protected |
TileSet(TileXY t1,
TileXY t2,
int zoom) |
Modifier and Type | Method and Description |
---|---|
private java.util.List<Tile> |
allExistingTiles()
Get all tiles represented by this TileSet that are already in the tileCache.
|
private java.util.List<Tile> |
allLoadedTiles() |
private java.util.List<Tile> |
allTiles(java.util.function.Function<TilePosition,Tile> mapper) |
private java.util.List<Tile> |
allTilesCreate() |
private java.util.Comparator<Tile> |
getTileDistanceComparator() |
private AbstractTileSourceLayer.TileSetInfo |
getTileSetInfo() |
boolean |
hasAllLoadedTiles()
Check if all tiles in the range are fully loaded.
|
boolean |
hasLoadingTiles()
Check if there are tiles still loading.
|
boolean |
hasOverzoomedTiles()
Check if there there is a tile that is overzoomed.
|
boolean |
hasVisibleTiles()
Check if there is any tile fully loaded without error.
|
private boolean |
insane() |
private void |
loadAllErrorTiles(boolean force) |
private void |
loadAllTiles(boolean force) |
protected void |
sanitize() |
java.util.stream.Stream<TilePosition> |
tilePositions()
Gets a stream of all tile positions in this set
|
private boolean |
tooLarge() |
private boolean |
tooSmall() |
java.lang.String |
toString() |
private void |
visitTilePosition(java.util.function.Consumer<Tile> visitor,
TilePosition tp,
java.util.function.Consumer<TilePosition> missed) |
void |
visitTiles(java.util.function.Consumer<Tile> visitor,
java.util.function.Consumer<TilePosition> missed)
Call the given paint method for all tiles in this tile set.
|
size, tilesSpanned
private volatile AbstractTileSourceLayer.TileSetInfo info
private TileSet()
protected void sanitize()
private boolean tooSmall()
private boolean tooLarge()
private boolean insane()
private java.util.List<Tile> allExistingTiles()
private java.util.List<Tile> allTilesCreate()
private java.util.List<Tile> allTiles(java.util.function.Function<TilePosition,Tile> mapper)
public java.util.stream.Stream<TilePosition> tilePositions()
private java.util.List<Tile> allLoadedTiles()
private java.util.Comparator<Tile> getTileDistanceComparator()
private void loadAllTiles(boolean force)
private void loadAllErrorTiles(boolean force)
public void visitTiles(java.util.function.Consumer<Tile> visitor, java.util.function.Consumer<TilePosition> missed)
Uses a parallel stream.
visitor
- A visitor to call for each tile.missed
- a consumer to call for each missed tile.private void visitTilePosition(java.util.function.Consumer<Tile> visitor, TilePosition tp, java.util.function.Consumer<TilePosition> missed)
public boolean hasVisibleTiles()
public boolean hasOverzoomedTiles()
I.e. the server response for one tile was "there is no tile here". This usually happens when zoomed in too much. The limit depends on the region, so at the edge of such a region, some tiles may be available and some not.
public boolean hasLoadingTiles()
This is the case if there is a tile not yet in the cache, or in the
cache but marked as loading (Tile.isLoading()
.
public boolean hasAllLoadedTiles()
A tile is considered to be fully loaded even if the result of loading the tile was an error.
private AbstractTileSourceLayer.TileSetInfo getTileSetInfo()
public java.lang.String toString()
toString
in class java.lang.Object