Package org.openstreetmap.josm.gui.layer
Class AbstractTileSourceLayer.TileSet
java.lang.Object
org.openstreetmap.gui.jmapviewer.TileRange
org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.TileSet
- Enclosing class:
- AbstractTileSourceLayer<T extends org.openstreetmap.gui.jmapviewer.tilesources.AbstractTMSTileSource>
-
Field Summary
FieldsFields inherited from class org.openstreetmap.gui.jmapviewer.TileRange
maxX, maxY, minX, minY, zoom -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate List<org.openstreetmap.gui.jmapviewer.Tile>Get all tiles represented by this TileSet that are already in the tileCache.private List<org.openstreetmap.gui.jmapviewer.Tile>private List<org.openstreetmap.gui.jmapviewer.Tile>allTiles(Function<TilePosition, org.openstreetmap.gui.jmapviewer.Tile> mapper) private List<org.openstreetmap.gui.jmapviewer.Tile>private Comparator<org.openstreetmap.gui.jmapviewer.Tile>booleanCheck if all tiles in the range are fully loaded.booleanCheck if there are tiles still loading.booleanCheck if there there is a tile that is overzoomed.booleanCheck if there is any tile fully loaded without error.private voidloadAllErrorTiles(boolean force) private voidloadAllTiles(boolean force) private voidExtend tile loading corridor, so that no flickering happens when panningprotected voidsanitize()Gets a stream of all tile positions in this setprivate booleantooLarge()private booleantooSmall()toString()private voidvisitTilePosition(Consumer<org.openstreetmap.gui.jmapviewer.Tile> visitor, TilePosition tp, Consumer<TilePosition> missed) voidvisitTiles(Consumer<org.openstreetmap.gui.jmapviewer.Tile> visitor, Consumer<TilePosition> missed) Call the given paint method for all tiles in this tile set.Methods inherited from class org.openstreetmap.gui.jmapviewer.TileRange
size, tilesSpanned
-
Field Details
-
info
-
-
Constructor Details
-
Method Details
-
sanitize
-
tooSmall
-
tooLarge
-
allExistingTiles
Get all tiles represented by this TileSet that are already in the tileCache.- Returns:
- all tiles represented by this TileSet that are already in the tileCache
-
allTilesCreate
-
allTiles
private List<org.openstreetmap.gui.jmapviewer.Tile> allTiles(Function<TilePosition, org.openstreetmap.gui.jmapviewer.Tile> mapper) -
tilePositions
Gets a stream of all tile positions in this set- Returns:
- A stream of all positions
-
allLoadedTiles
-
getTileDistanceComparator
- Returns:
- comparator, that sorts the tiles from the center to the edge of the current screen
-
loadAllTiles
-
overloadTiles
Extend tile loading corridor, so that no flickering happens when panning -
loadAllErrorTiles
-
visitTiles
public void visitTiles(Consumer<org.openstreetmap.gui.jmapviewer.Tile> visitor, Consumer<TilePosition> missed) Call the given paint method for all tiles in this tile set.Uses a parallel stream.
- Parameters:
visitor- A visitor to call for each tile.missed- a consumer to call for each missed tile.
-
visitTilePosition
private void visitTilePosition(Consumer<org.openstreetmap.gui.jmapviewer.Tile> visitor, TilePosition tp, Consumer<TilePosition> missed) -
hasVisibleTiles
Check if there is any tile fully loaded without error.- Returns:
- true if there is any tile fully loaded without error
-
hasOverzoomedTiles
Check if there there is a tile that is overzoomed.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.
- Returns:
- true if there there is a tile that is overzoomed
-
hasLoadingTiles
Check if there are tiles still loading.This is the case if there is a tile not yet in the cache, or in the cache but marked as loading (
Tile.isLoading().- Returns:
- true if there are tiles still loading
-
hasAllLoadedTiles
Check if all tiles in the range are fully loaded.A tile is considered to be fully loaded even if the result of loading the tile was an error.
- Returns:
- true if all tiles in the range are fully loaded
-
getTileSetInfo
-
toString
-