public abstract class BitmapTileSourceBase extends Object implements ITileSource
Modifier and Type | Class and Description |
---|---|
static class |
BitmapTileSourceBase.LowMemoryException |
Modifier and Type | Field and Description |
---|---|
protected String |
mImageFilenameEnding |
protected String |
mName |
protected Random |
random |
Constructor and Description |
---|
BitmapTileSourceBase(String aName,
int aZoomMinLevel,
int aZoomMaxLevel,
int aTileSizePixels,
String aImageFilenameEnding)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Drawable |
getDrawable(InputStream aFileInputStream)
Get a rendered Drawable from the specified InputStream.
|
Drawable |
getDrawable(String aFilePath)
Get a rendered Drawable from the specified file path.
|
int |
getMaximumZoomLevel()
Get the maximum zoom level this tile source can provide.
|
int |
getMinimumZoomLevel()
Get the minimum zoom level this tile source can provide.
|
String |
getTileRelativeFilenameString(MapTile tile)
Get a unique file path for the tile.
|
int |
getTileSizePixels()
Get the tile size in pixels this tile source provides.
|
String |
imageFilenameEnding() |
String |
name()
A human-friendly name for this tile source
|
int |
ordinal()
An ordinal identifier for this tile source
|
String |
pathBase() |
protected String mName
protected final String mImageFilenameEnding
protected final Random random
public BitmapTileSourceBase(String aName, int aZoomMinLevel, int aZoomMaxLevel, int aTileSizePixels, String aImageFilenameEnding)
aName
- a human-friendly name for this tile source. this name is also used on the file system, to keep the characters linux file system friendlyaZoomMinLevel
- the minimum zoom level this tile source can provideaZoomMaxLevel
- the maximum zoom level this tile source can provideaTileSizePixels
- the tile size in pixels this tile source providesaImageFilenameEnding
- the file name extension used when constructing the filenamepublic int ordinal()
ITileSource
ordinal
in interface ITileSource
public String name()
ITileSource
name
in interface ITileSource
public String pathBase()
public String imageFilenameEnding()
public int getMinimumZoomLevel()
ITileSource
getMinimumZoomLevel
in interface ITileSource
public int getMaximumZoomLevel()
ITileSource
getMaximumZoomLevel
in interface ITileSource
public int getTileSizePixels()
ITileSource
getTileSizePixels
in interface ITileSource
public Drawable getDrawable(String aFilePath) throws BitmapTileSourceBase.LowMemoryException
ITileSource
getDrawable
in interface ITileSource
aFilePath
- a file pathBitmapTileSourceBase.LowMemoryException
public String getTileRelativeFilenameString(MapTile tile)
ITileSource
getTileRelativeFilenameString
in interface ITileSource
tile
- the tilepublic Drawable getDrawable(InputStream aFileInputStream) throws BitmapTileSourceBase.LowMemoryException
ITileSource
getDrawable
in interface ITileSource
aFileInputStream
- an InputStreamBitmapTileSourceBase.LowMemoryException