org.epseelon.mobimap.tiles
Class AbstractTileFactory
java.lang.Object
org.epseelon.mobimap.tiles.TileFactory
org.epseelon.mobimap.tiles.AbstractTileFactory
- Direct Known Subclasses:
- AbstractOpenStreetMapTileFactory, AbstractVirtualEarthTileFactory, AbstractYahooTileFactory, GoogleMapTileFactory, GoogleSatelliteTileFactory
public abstract class AbstractTileFactory
- extends TileFactory
- Version:
- 14 juin 2008, 14:50:33
- Author:
- sarbogast
|
Constructor Summary |
protected |
AbstractTileFactory(TileFactoryInfo info,
javax.microedition.lcdui.Canvas canvasToRepaintWhenLoaded,
int cacheSize)
Creates a new instance of TileFactory |
|
Method Summary |
Tile |
getTile(int x,
int y,
int zoom)
Return the Tile at a given TilePoint and zoom level |
java.lang.String |
getTileUrl(int x,
int y,
int zoom)
Returns the tile url for the specified tile at the specified
zoom level. |
protected void |
startLoading(Tile tile)
Starts loading the tile in a different thread. canvasToRepaint will be repainted when the tile is loaded |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTileFactory
protected AbstractTileFactory(TileFactoryInfo info,
javax.microedition.lcdui.Canvas canvasToRepaintWhenLoaded,
int cacheSize)
- Creates a new instance of TileFactory
- Parameters:
info - a TileFactoryInfo to configure this TileFactory
getTile
public Tile getTile(int x,
int y,
int zoom)
- Description copied from class:
TileFactory
- Return the Tile at a given TilePoint and zoom level
- Specified by:
getTile in class TileFactory
- Parameters:
x - Abscissa of the tile to retrieve (between 0 and 2^zoom/tilesize - 1)y - Ordinate of the tile to retrieve (between 0 and 2^zoom/tilesize - 1)zoom - Zoom of the tile to load
- Returns:
- The tile corresponding to those coordinates
getTileUrl
public java.lang.String getTileUrl(int x,
int y,
int zoom)
- Returns the tile url for the specified tile at the specified
zoom level. By default it will generate a tile url using the
base url and parameters specified in the constructor.
- Parameters:
zoom - the zoom levelx - abscissa of the tile pointy - ordinate of the tile point
- Returns:
- a valid url to load the tile
startLoading
protected void startLoading(Tile tile)
- Starts loading the tile in a different thread. canvasToRepaint will be repainted when the tile is loaded
- Specified by:
startLoading in class TileFactory
- Parameters:
tile - The tile to load
Copyright © 2008 Epseelon. All Rights Reserved.