Class TileLoader

All Implemented Interfaces:
Runnable, ITileDataSink
Direct Known Subclasses:
BitmapTileLoader, VectorTileLoader

public abstract class TileLoader extends PausableThread implements ITileDataSink
  • Field Details

    • mTile

      protected MapTile mTile
      currently processed tile
  • Constructor Details

    • TileLoader

      public TileLoader(TileManager tileManager)
  • Method Details

    • loadTile

      protected abstract boolean loadTile(MapTile tile)
    • go

      public void go()
    • doWork

      protected void doWork()
      Description copied from class: PausableThread
      Called when this thread is not paused and should do its work.
      Specified by:
      doWork in class PausableThread
    • getThreadName

      protected String getThreadName()
      Specified by:
      getThreadName in class PausableThread
      Returns:
      the name of this thread.
    • getThreadPriority

      protected int getThreadPriority()
      Overrides:
      getThreadPriority in class PausableThread
      Returns:
      the priority of this thread. The default value is Thread.NORM_PRIORITY.
    • hasWork

      protected boolean hasWork()
      Specified by:
      hasWork in class PausableThread
      Returns:
      true if this thread has some work to do, false otherwise.
    • dispose

      public abstract void dispose()
    • cancel

      public abstract void cancel()
    • completed

      public void completed(QueryResult result)
      Callback to be called by TileDataSource when finished loading or on failure. MUST BE CALLED IN ANY CASE!
      Specified by:
      completed in interface ITileDataSink
    • process

      public void process(MapElement element)
      Called by TileDataSource
      Specified by:
      process in interface ITileDataSink
    • setTileImage

      public void setTileImage(Bitmap bitmap)
      Called by TileDataSource
      Specified by:
      setTileImage in interface ITileDataSink