类 AbstractTileFactory

  • 直接已知子类:
    DefaultTileFactory

    public abstract class AbstractTileFactory
    extends TileFactory
    The AbstractTileFactory provides a basic implementation for the TileFactory.
    • 构造器详细资料

      • AbstractTileFactory

        public AbstractTileFactory​(TileFactoryInfo info)
        Creates a new instance of DefaultTileFactory using the spcified TileFactoryInfo
        参数:
        info - a TileFactoryInfo to configure this TileFactory
    • 方法详细资料

      • getTile

        public Tile getTile​(int x,
                            int y,
                            int zoom)
        Returns the tile that is located at the given tilePoint for this zoom. For example, if getMapSize() returns 10x20 for this zoom, and the tilePoint is (3,5), then the appropriate tile will be located and returned.
        指定者:
        getTile 在类中 TileFactory
        参数:
        x - X index
        y - Y index
        zoom - Zoom value
        返回:
        Tile
      • getTileCache

        public TileCache getTileCache()
      • setTileCache

        public void setTileCache​(TileCache cache)
      • getService

        protected ExecutorService getService()
        Subclasses may override this method to provide their own executor services. This method will be called each time a tile needs to be loaded. Implementations should cache the ExecutorService when possible.
        返回:
        ExecutorService to load tiles with
      • setThreadPoolSize

        public void setThreadPoolSize​(int size)
        Set the number of threads to use for loading the tiles. This controls the number of threads used by the ExecutorService returned from getService(). Note, this method should be called before loading the first tile. Calls after the first tile are loaded will have no effect by default.
        参数:
        size -
      • startLoading

        protected void startLoading​(Tile tile)
        从类复制的说明: TileFactory
        Override this method to load the tile using, for example, an ExecutorService.
        指定者:
        startLoading 在类中 TileFactory
        参数:
        tile - The tile to load.
      • createTileRunner

        protected Runnable createTileRunner​(Tile tile)
        Subclasses can override this if they need custom TileRunners for some reason
        参数:
        tile - Tile
        返回:
        Runnable
      • promote

        public void promote​(Tile tile)
        Increase the priority of this tile so it will be loaded sooner.
        参数:
        tile - Tile