Package nl.bebr.mapviewer.data.cache
Class OfflineTileFactory<T>
- java.lang.Object
-
- nl.bebr.mapviewer.data.TileFactory<T,U>
-
- nl.bebr.mapviewer.data.AbstractTileFactory<T,U>
-
- nl.bebr.mapviewer.data.DefaultTileFactory<T,Tile<T>>
-
- nl.bebr.mapviewer.data.cache.OfflineTileFactory<T>
-
public abstract class OfflineTileFactory<T> extends DefaultTileFactory<T,Tile<T>>
Copied some code from AbstractTileFactory, so I can use own TileRunner, which does all the reading and writing to the cache- Author:
- Frantisek Post
-
-
Constructor Summary
Constructors Constructor Description OfflineTileFactory(TileFactoryInfo tileFactoryInfo)Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Tile<T>createOfflineTile(int tileX, int tileY, int zoom, String url)Method for creating offline TileTile<T>getTile(int x, int y, int zoom)Returns the tile that is located at the given tilePoint for this zoom.-
Methods inherited from class nl.bebr.mapviewer.data.AbstractTileFactory
clearQueueAndStopLoading, createTile, createTileCache, createTileRunner, getService, getTileCache, getTileMap, getTileQueue, promote, setTileCache, startLoading
-
Methods inherited from class nl.bebr.mapviewer.data.TileFactory
geoToPixel, getInfo, getMapSize, getTileSize, pixelToGeo
-
-
-
-
Constructor Detail
-
OfflineTileFactory
public OfflineTileFactory(TileFactoryInfo tileFactoryInfo)
Constructor- Parameters:
tileFactoryInfo-
-
-
Method Detail
-
getTile
public Tile<T> getTile(int x, int y, int zoom)
Description copied from class:AbstractTileFactoryReturns 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.- Overrides:
getTilein classAbstractTileFactory<T,Tile<T>>zoom- the current zoom level- Returns:
- the tile that is located at the given tilePoint for this zoom level. For example, if getMapSize() returns 10x20 for this zoom, and the tilePoint is (3,5), then the appropriate tile will be located and returned. This method must not return null. However, it can return dummy tiles that contain no data if it wants. This is appropriate, for example, for tiles which are outside of the bounds of the map and if the factory doesn't implement wrapping.
-
-