org.osmdroid.tileprovider.modules
Class MapTileModuleProviderBase.TileLoader

java.lang.Object
  extended by org.osmdroid.tileprovider.modules.MapTileModuleProviderBase.TileLoader
All Implemented Interfaces:
Runnable
Enclosing class:
MapTileModuleProviderBase

protected abstract class MapTileModuleProviderBase.TileLoader
extends Object
implements Runnable

Load the requested tile. An abstract internal class whose objects are used by worker threads to acquire tiles from servers. It processes tiles from the 'pending' set to the 'working' set as they become available. The key unimplemented method is 'loadTile'.


Constructor Summary
protected MapTileModuleProviderBase.TileLoader()
           
 
Method Summary
protected abstract  android.graphics.drawable.Drawable loadTile(MapTileRequestState pState)
          Load the requested tile.
 void run()
          This is a functor class of type Runnable.
protected  void tileLoaded(MapTileRequestState pState, android.graphics.drawable.Drawable pDrawable)
          A tile has loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapTileModuleProviderBase.TileLoader

protected MapTileModuleProviderBase.TileLoader()
Method Detail

loadTile

protected abstract android.graphics.drawable.Drawable loadTile(MapTileRequestState pState)
                                                        throws MapTileModuleProviderBase.CantContinueException
Load the requested tile.

Parameters:
pState -
Returns:
the tile if it was loaded successfully, or null if failed to load and other tile providers need to be called
Throws:
{@link - CantContinueException}
MapTileModuleProviderBase.CantContinueException

tileLoaded

protected void tileLoaded(MapTileRequestState pState,
                          android.graphics.drawable.Drawable pDrawable)
A tile has loaded.


run

public final void run()
This is a functor class of type Runnable. The run method is the encapsulated function.

Specified by:
run in interface Runnable


Copyright © 2012. All Rights Reserved.