类 AbstractTileFactory
- java.lang.Object
-
- org.meteoinfo.data.mapdata.webmap.TileFactory
-
- org.meteoinfo.data.mapdata.webmap.AbstractTileFactory
-
- 直接已知子类:
DefaultTileFactory
public abstract class AbstractTileFactory extends TileFactory
TheAbstractTileFactoryprovides a basic implementation for the TileFactory.
-
-
构造器概要
构造器 构造器 说明 AbstractTileFactory(TileFactoryInfo info)Creates a new instance of DefaultTileFactory using the spcified TileFactoryInfo
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected RunnablecreateTileRunner(Tile tile)Subclasses can override this if they need custom TileRunners for some reasonprotected ExecutorServicegetService()Subclasses may override this method to provide their own executor services.TilegetTile(int x, int y, int zoom)Returns the tile that is located at the given tilePoint for this zoom.TileCachegetTileCache()protected URIgetURI(Tile tile)Gets the full URI of a tile.voidload(Tile tile)voidpromote(Tile tile)Increase the priority of this tile so it will be loaded sooner.voidsetThreadPoolSize(int size)Set the number of threads to use for loading the tiles.voidsetTileCache(TileCache cache)protected voidstartLoading(Tile tile)Override this method to load the tile using, for example, anExecutorService.-
从类继承的方法 org.meteoinfo.data.mapdata.webmap.TileFactory
geoToPixel, getInfo, getMapSize, getTileSize, pixelToGeo
-
-
-
-
构造器详细资料
-
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 indexy- Y indexzoom- 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)
从类复制的说明:TileFactoryOverride this method to load the tile using, for example, anExecutorService.- 指定者:
startLoading在类中TileFactory- 参数:
tile- The tile to load.
-
load
public void load(Tile tile)
- 指定者:
load在类中TileFactory
-
getURI
protected URI getURI(Tile tile) throws URISyntaxException
Gets the full URI of a tile.- 参数:
tile-- 返回:
- URI
- 抛出:
URISyntaxException
-
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
-
-