类 AbstractTileFactory

  • 直接已知子类:
    DefaultTileFactory

    public abstract class AbstractTileFactory
    extends TileFactory
    The AbstractTileFactory provides a basic implementation for the TileFactory.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      protected java.lang.Runnable createTileRunner​(Tile tile)
      Subclasses can override this if they need custom TileRunners for some reason
      protected java.util.concurrent.ExecutorService getService()
      Subclasses may override this method to provide their own executor services.
      Tile getTile​(int x, int y, int zoom)
      Returns the tile that is located at the given tilePoint for this zoom.
      TileCache getTileCache()  
      protected java.net.URI getURI​(Tile tile)
      Gets the full URI of a tile.
      void load​(Tile tile)  
      void promote​(Tile tile)
      Increase the priority of this tile so it will be loaded sooner.
      void setThreadPoolSize​(int size)
      Set the number of threads to use for loading the tiles.
      void setTileCache​(TileCache cache)  
      protected void startLoading​(Tile tile)
      Override this method to load the tile using, for example, an ExecutorService.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • 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 java.util.concurrent.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.
      • getURI

        protected java.net.URI getURI​(Tile tile)
                               throws java.net.URISyntaxException
        Gets the full URI of a tile.
        参数:
        tile -
        返回:
        URI
        抛出:
        java.net.URISyntaxException
      • createTileRunner

        protected java.lang.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