Package org.mapsforge.map.awt.util
Class AwtUtil
- java.lang.Object
-
- org.mapsforge.map.awt.util.AwtUtil
-
public final class AwtUtil extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.mapsforge.map.layer.cache.TileCache
createTileCache(int tileSize, double overdrawFactor, int capacity, java.io.File cacheDirectory)
Utility function to create a two-level tile cache with the right size, using the size of the screen.static int
getMinimumCacheSize(int tileSize, double overdrawFactor)
Compute the minimum cache size for a view, using the size of the screen.
-
-
-
Method Detail
-
createTileCache
public static org.mapsforge.map.layer.cache.TileCache createTileCache(int tileSize, double overdrawFactor, int capacity, java.io.File cacheDirectory)
Utility function to create a two-level tile cache with the right size, using the size of the screen.Combine with
FrameBufferController.setUseSquareFrameBuffer(false);
- Parameters:
tileSize
- the tile sizeoverdrawFactor
- the overdraw factor applied to the map viewcapacity
- the maximum number of entries in file cachecacheDirectory
- the directory where cached tiles will be stored- Returns:
- a new cache created on the file system
-
getMinimumCacheSize
public static int getMinimumCacheSize(int tileSize, double overdrawFactor)
Compute the minimum cache size for a view, using the size of the screen.Combine with
FrameBufferController.setUseSquareFrameBuffer(false);
- Parameters:
tileSize
- the tile sizeoverdrawFactor
- the overdraw factor applied to the map view- Returns:
- the minimum cache size for the view
-
-