Package nl.bebr.mapviewer.data.bmng
Class CylindricalProjectionTileFactory<T,U extends Tile<T>>
- java.lang.Object
-
- nl.bebr.mapviewer.data.TileFactory<T,U>
-
- nl.bebr.mapviewer.data.AbstractTileFactory<T,U>
-
- nl.bebr.mapviewer.data.DefaultTileFactory<T,U>
-
- nl.bebr.mapviewer.data.bmng.CylindricalProjectionTileFactory<T,U>
-
public class CylindricalProjectionTileFactory<T,U extends Tile<T>> extends DefaultTileFactory<T,U>
-
-
Constructor Summary
Constructors Constructor Description CylindricalProjectionTileFactory()CylindricalProjectionTileFactory(SLMapServerInfo info)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UcreateTile(int x, int y, int zoom, String url, AbstractTileFactory<T,U> tileFactory)TileCache<T>createTileCache()protected RunnablecreateTileRunner()Subclasses can override this if they need custom TileRunners for some reasonPoint2DgeoToPixel(GeoPosition c, int zoom)Convert a GeoPosition to a pixel position in the world bitmap a the specified zoom level.DimensiongetMapSize(int zoom)Returns a Dimension containing the width and height of the map, in tiles at the current zoom level.protected Map<String,U>getTileMap()gets tileMap which should be static.
target implementation should provide static tileMapBlockingQueue<U>getTileQueue()gets tileQueue which should be static.
target implementation should provide static tileQueueGeoPositionpixelToGeo(Point2D pix, int zoom)Convert a pixel in the world bitmap at the specified zoom level into a GeoPosition-
Methods inherited from class nl.bebr.mapviewer.data.AbstractTileFactory
clearQueueAndStopLoading, getService, getTile, getTileCache, promote, setTileCache, startLoading
-
Methods inherited from class nl.bebr.mapviewer.data.TileFactory
getInfo, getTileSize
-
-
-
-
Constructor Detail
-
CylindricalProjectionTileFactory
public CylindricalProjectionTileFactory()
-
CylindricalProjectionTileFactory
public CylindricalProjectionTileFactory(SLMapServerInfo info)
-
-
Method Detail
-
getMapSize
public Dimension getMapSize(int zoom)
Description copied from class:TileFactoryReturns a Dimension containing the width and height of the map, in tiles at the current zoom level. So a Dimension that returns 10x20 would be 10 tiles wide and 20 tiles tall. These values can be multipled by getTileSize() to determine the pixel width/height for the map at the given zoom level- Overrides:
getMapSizein classTileFactory<T,U extends Tile<T>>- Parameters:
zoom- the current zoom level- Returns:
- the size of the world bitmap in tiles
-
geoToPixel
public Point2D geoToPixel(GeoPosition c, int zoom)
Description copied from class:TileFactoryConvert a GeoPosition to a pixel position in the world bitmap a the specified zoom level.- Overrides:
geoToPixelin classTileFactory<T,U extends Tile<T>>- Parameters:
c- a GeoPosition- Returns:
- the pixel point
-
pixelToGeo
public GeoPosition pixelToGeo(Point2D pix, int zoom)
Description copied from class:TileFactoryConvert a pixel in the world bitmap at the specified zoom level into a GeoPosition- Overrides:
pixelToGeoin classTileFactory<T,U extends Tile<T>>- Parameters:
pix- a Point2D representing a pixel in the world bitmapzoom- the zoom level of the world bitmap- Returns:
- the converted GeoPosition
-
createTileRunner
protected Runnable createTileRunner()
Description copied from class:AbstractTileFactorySubclasses can override this if they need custom TileRunners for some reason- Specified by:
createTileRunnerin classAbstractTileFactory<T,U extends Tile<T>>- Returns:
-
createTileCache
public TileCache<T> createTileCache()
- Specified by:
createTileCachein classAbstractTileFactory<T,U extends Tile<T>>
-
createTile
public U createTile(int x, int y, int zoom, String url, AbstractTileFactory<T,U> tileFactory)
- Specified by:
createTilein classAbstractTileFactory<T,U extends Tile<T>>
-
getTileQueue
public BlockingQueue<U> getTileQueue()
Description copied from class:AbstractTileFactorygets tileQueue which should be static.
target implementation should provide static tileQueue- Specified by:
getTileQueuein classAbstractTileFactory<T,U extends Tile<T>>
-
getTileMap
protected Map<String,U> getTileMap()
Description copied from class:AbstractTileFactorygets tileMap which should be static.
target implementation should provide static tileMap- Specified by:
getTileMapin classAbstractTileFactory<T,U extends Tile<T>>
-
-