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 |
mCopyright |
protected String |
mImageFilenameEnding |
protected String |
mName |
protected Random |
random |
Constructor and Description |
---|
BitmapTileSourceBase(String aName,
int aZoomMinLevel,
int aZoomMaxLevel,
int aTileSizePixels,
String aImageFilenameEnding)
Constructor
|
BitmapTileSourceBase(String aName,
int aZoomMinLevel,
int aZoomMaxLevel,
int aTileSizePixels,
String aImageFilenameEnding,
String aCopyrightNotice)
Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getCopyrightNotice()
Returns an I18N sensitive string representing the copy right notice (if any) of the tile source
|
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(long pMapTileIndex)
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() |
String |
toString() |
protected String mName
protected String mCopyright
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 BitmapTileSourceBase(String aName, int aZoomMinLevel, int aZoomMaxLevel, int aTileSizePixels, String aImageFilenameEnding, String aCopyrightNotice)
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(long pMapTileIndex)
ITileSource
getTileRelativeFilenameString
in interface ITileSource
pMapTileIndex
- the tilepublic Drawable getDrawable(InputStream aFileInputStream) throws BitmapTileSourceBase.LowMemoryException
ITileSource
getDrawable
in interface ITileSource
aFileInputStream
- an InputStreamBitmapTileSourceBase.LowMemoryException
public String getCopyrightNotice()
ITileSource
getCopyrightNotice
in interface ITileSource