org.osmdroid.tileprovider.tilesource
Class BitmapTileSourceBase

java.lang.Object
  extended by org.osmdroid.tileprovider.tilesource.BitmapTileSourceBase
All Implemented Interfaces:
OpenStreetMapTileProviderConstants, ITileSource
Direct Known Subclasses:
OnlineTileSourceBase

public abstract class BitmapTileSourceBase
extends Object
implements ITileSource, OpenStreetMapTileProviderConstants


Nested Class Summary
 class BitmapTileSourceBase.LowMemoryException
           
 
Field Summary
protected  String mImageFilenameEnding
           
protected  String mName
           
protected  Random random
           
 
Fields inherited from interface org.osmdroid.tileprovider.constants.OpenStreetMapTileProviderConstants
CACHE_MAPTILECOUNT_DEFAULT, DEBUGMODE, DEFAULT_MAXIMUM_CACHED_FILE_AGE, MAXIMUM_ZOOMLEVEL, 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 Summary
BitmapTileSourceBase(String aName, ResourceProxy.string aResourceId, int aZoomMinLevel, int aZoomMaxLevel, int aTileSizePixels, String aImageFilenameEnding)
           
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mName

protected final String mName

mImageFilenameEnding

protected final String mImageFilenameEnding

random

protected final Random random
Constructor Detail

BitmapTileSourceBase

public BitmapTileSourceBase(String aName,
                            ResourceProxy.string aResourceId,
                            int aZoomMinLevel,
                            int aZoomMaxLevel,
                            int aTileSizePixels,
                            String aImageFilenameEnding)
Method Detail

ordinal

public int ordinal()
Description copied from interface: ITileSource
An ordinal identifier for this tile source

Specified by:
ordinal in interface ITileSource
Returns:
the ordinal value

name

public String name()
Description copied from interface: ITileSource
A human-friendly name for this tile source

Specified by:
name in interface ITileSource
Returns:
the tile source name

pathBase

public String pathBase()

imageFilenameEnding

public String imageFilenameEnding()

getMinimumZoomLevel

public int getMinimumZoomLevel()
Description copied from interface: ITileSource
Get the minimum zoom level this tile source can provide.

Specified by:
getMinimumZoomLevel in interface ITileSource
Returns:
the minimum zoom level

getMaximumZoomLevel

public int getMaximumZoomLevel()
Description copied from interface: ITileSource
Get the maximum zoom level this tile source can provide.

Specified by:
getMaximumZoomLevel in interface ITileSource
Returns:
the maximum zoom level

getTileSizePixels

public int getTileSizePixels()
Description copied from interface: ITileSource
Get the tile size in pixels this tile source provides.

Specified by:
getTileSizePixels in interface ITileSource
Returns:
the tile size in pixels

localizedName

public String localizedName(ResourceProxy proxy)
Description copied from interface: ITileSource
A localized human-friendly name for this tile source

Specified by:
localizedName in interface ITileSource
Parameters:
proxy - a resource proxy
Returns:
the localized tile source name

getDrawable

public android.graphics.drawable.Drawable getDrawable(String aFilePath)
Description copied from interface: ITileSource
Get a rendered Drawable from the specified file path.

Specified by:
getDrawable in interface ITileSource
Parameters:
aFilePath - a file path
Returns:
the rendered Drawable

getTileRelativeFilenameString

public String getTileRelativeFilenameString(MapTile tile)
Description copied from interface: ITileSource
Get a unique file path for the tile. This file path may be used to store the tile on a file system and performance considerations should be taken into consideration. It can include multiple paths. It should not begin with a leading path separator.

Specified by:
getTileRelativeFilenameString in interface ITileSource
Parameters:
tile - the tile
Returns:
the unique file path

getDrawable

public android.graphics.drawable.Drawable getDrawable(InputStream aFileInputStream)
                                               throws BitmapTileSourceBase.LowMemoryException
Description copied from interface: ITileSource
Get a rendered Drawable from the specified InputStream.

Specified by:
getDrawable in interface ITileSource
Parameters:
aFileInputStream - an InputStream
Returns:
the rendered Drawable
Throws:
BitmapTileSourceBase.LowMemoryException


Copyright © 2012. All Rights Reserved.