Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 size
        overdrawFactor - the overdraw factor applied to the map view
        capacity - the maximum number of entries in file cache
        cacheDirectory - 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 size
        overdrawFactor - the overdraw factor applied to the map view
        Returns:
        the minimum cache size for the view