org.osmdroid.tileprovider.modules
Class MapTileFileArchiveProvider

java.lang.Object
  extended by org.osmdroid.tileprovider.modules.MapTileModuleProviderBase
      extended by org.osmdroid.tileprovider.modules.MapTileFileStorageProviderBase
          extended by org.osmdroid.tileprovider.modules.MapTileFileArchiveProvider
All Implemented Interfaces:
OpenStreetMapTileProviderConstants

public class MapTileFileArchiveProvider
extends MapTileFileStorageProviderBase

A tile provider that can serve tiles from an archive using the supplied tile source. The tile provider will automatically find existing archives and use each one that it finds.

Author:
Marc Kurtz, Nicolas Gramlich

Nested Class Summary
 
Nested classes/interfaces inherited from class org.osmdroid.tileprovider.modules.MapTileModuleProviderBase
MapTileModuleProviderBase.CantContinueException
 
Field Summary
protected  ITileSource mTileSource
           
 
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
MapTileFileArchiveProvider(IRegisterReceiver pRegisterReceiver, ITileSource pTileSource)
           
MapTileFileArchiveProvider(IRegisterReceiver pRegisterReceiver, ITileSource pTileSource, IArchiveFile[] pArchives)
          The tiles may be found on several media.
 
Method Summary
 void detach()
          Detach, we're shutting down - Stops all workers.
 int getMaximumZoomLevel()
          Gets the maximum zoom level this tile provider can provide
 int getMinimumZoomLevel()
          Gets the minimum zoom level this tile provider can provide
protected  String getName()
          Gets the human-friendly name assigned to this tile provider.
protected  String getThreadGroupName()
          Gets the name assigned to the thread for this provider.
protected  Runnable getTileLoader()
          It is expected that the implementation will construct an internal member which internally implements a MapTileModuleProviderBase.TileLoader.
 boolean getUsesDataConnection()
          Returns true if implementation uses a data connection, false otherwise.
protected  void onMediaMounted()
           
protected  void onMediaUnmounted()
           
 void setTileSource(ITileSource pTileSource)
          Sets the tile source for this tile provider.
 
Methods inherited from class org.osmdroid.tileprovider.modules.MapTileFileStorageProviderBase
getSdCardAvailable
 
Methods inherited from class org.osmdroid.tileprovider.modules.MapTileModuleProviderBase
loadMapTileAsync
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mTileSource

protected ITileSource mTileSource
Constructor Detail

MapTileFileArchiveProvider

public MapTileFileArchiveProvider(IRegisterReceiver pRegisterReceiver,
                                  ITileSource pTileSource,
                                  IArchiveFile[] pArchives)
The tiles may be found on several media. This one works with tiles stored on the file system. It and its friends are typically created and controlled by MapTileProviderBase.


MapTileFileArchiveProvider

public MapTileFileArchiveProvider(IRegisterReceiver pRegisterReceiver,
                                  ITileSource pTileSource)
Method Detail

getUsesDataConnection

public boolean getUsesDataConnection()
Description copied from class: MapTileModuleProviderBase
Returns true if implementation uses a data connection, false otherwise. This value is used to determine if this provider should be skipped if there is no data connection.

Specified by:
getUsesDataConnection in class MapTileModuleProviderBase
Returns:
true if implementation uses a data connection, false otherwise

getName

protected String getName()
Description copied from class: MapTileModuleProviderBase
Gets the human-friendly name assigned to this tile provider.

Specified by:
getName in class MapTileModuleProviderBase
Returns:
the thread name

getThreadGroupName

protected String getThreadGroupName()
Description copied from class: MapTileModuleProviderBase
Gets the name assigned to the thread for this provider.

Specified by:
getThreadGroupName in class MapTileModuleProviderBase
Returns:
the thread name

getTileLoader

protected Runnable getTileLoader()
Description copied from class: MapTileModuleProviderBase
It is expected that the implementation will construct an internal member which internally implements a MapTileModuleProviderBase.TileLoader. This method is expected to return a that internal member to methods of the parent methods.

Specified by:
getTileLoader in class MapTileModuleProviderBase
Returns:
the internal member of this tile provider.

getMinimumZoomLevel

public int getMinimumZoomLevel()
Description copied from class: MapTileModuleProviderBase
Gets the minimum zoom level this tile provider can provide

Specified by:
getMinimumZoomLevel in class MapTileModuleProviderBase
Returns:
the minimum zoom level

getMaximumZoomLevel

public int getMaximumZoomLevel()
Description copied from class: MapTileModuleProviderBase
Gets the maximum zoom level this tile provider can provide

Specified by:
getMaximumZoomLevel in class MapTileModuleProviderBase
Returns:
the maximum zoom level

onMediaMounted

protected void onMediaMounted()
Overrides:
onMediaMounted in class MapTileFileStorageProviderBase

onMediaUnmounted

protected void onMediaUnmounted()
Overrides:
onMediaUnmounted in class MapTileFileStorageProviderBase

setTileSource

public void setTileSource(ITileSource pTileSource)
Description copied from class: MapTileModuleProviderBase
Sets the tile source for this tile provider.

Specified by:
setTileSource in class MapTileModuleProviderBase
Parameters:
pTileSource - the tile source

detach

public void detach()
Description copied from class: MapTileModuleProviderBase
Detach, we're shutting down - Stops all workers.

Overrides:
detach in class MapTileFileStorageProviderBase


Copyright © 2012. All Rights Reserved.