public abstract class BitmapTileSourceBase extends Object implements ITileSource, OpenStreetMapTileProviderConstants
Modifier and Type | Class and Description |
---|---|
class |
BitmapTileSourceBase.LowMemoryException |
Modifier and Type | Field and Description |
---|---|
protected String |
mImageFilenameEnding |
protected String |
mName |
protected Random |
random |
CACHE_MAPTILECOUNT_DEFAULT, DEBUG_TILE_PROVIDERS, DEBUGMODE, DEFAULT_MAXIMUM_CACHED_FILE_AGE, MINIMUM_ZOOMLEVEL, NUMBER_OF_TILE_DOWNLOAD_THREADS, NUMBER_OF_TILE_FILESYSTEM_THREADS, ONE_DAY, ONE_HOUR, ONE_MINUTE, ONE_SECOND, ONE_WEEK, ONE_YEAR, OSMDROID_PATH, TILE_DOWNLOAD_MAXIMUM_QUEUE_SIZE, TILE_EXPIRY_TIME_MILLISECONDS, TILE_FILESYSTEM_MAXIMUM_QUEUE_SIZE, TILE_MAX_CACHE_SIZE_BYTES, TILE_PATH_BASE, TILE_PATH_EXTENSION, TILE_TRIM_CACHE_SIZE_BYTES
Constructor and Description |
---|
BitmapTileSourceBase(String aName,
ResourceProxy.string aResourceId,
int aZoomMinLevel,
int aZoomMaxLevel,
int aTileSizePixels,
String aImageFilenameEnding)
Constructor
|
Modifier and Type | Method and Description |
---|---|
android.graphics.drawable.Drawable |
getDrawable(InputStream aFileInputStream)
Get a rendered Drawable from the specified InputStream.
|
android.graphics.drawable.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 |
localizedName(ResourceProxy proxy)
A localized human-friendly name for this tile source
|
String |
name()
A human-friendly name for this tile source
|
int |
ordinal()
An ordinal identifier for this tile source
|
String |
pathBase() |
protected final String mName
protected final String mImageFilenameEnding
protected final Random random
public BitmapTileSourceBase(String aName, ResourceProxy.string aResourceId, int aZoomMinLevel, int aZoomMaxLevel, int aTileSizePixels, String aImageFilenameEnding)
aName
- a human-friendly name for this tile sourceaResourceId
- resource id used to get the localized name of this tile sourceaZoomMinLevel
- 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 String localizedName(ResourceProxy proxy)
ITileSource
localizedName
in interface ITileSource
proxy
- a resource proxypublic android.graphics.drawable.Drawable getDrawable(String aFilePath)
ITileSource
getDrawable
in interface ITileSource
aFilePath
- a file pathpublic String getTileRelativeFilenameString(MapTile tile)
ITileSource
getTileRelativeFilenameString
in interface ITileSource
tile
- the tilepublic android.graphics.drawable.Drawable getDrawable(InputStream aFileInputStream) throws BitmapTileSourceBase.LowMemoryException
ITileSource
getDrawable
in interface ITileSource
aFileInputStream
- an InputStreamBitmapTileSourceBase.LowMemoryException
Copyright © 2015. All Rights Reserved.