Package 

Class MapTileProviderArray

  • All Implemented Interfaces:
    org.osmdroid.tileprovider.IMapTileProviderCallback , org.osmdroid.util.MapTileContainer

    
    public class MapTileProviderArray
    extends MapTileProviderBase implements MapTileContainer
                        

    This top-level tile provider allows a consumer to provide an array of modular asynchronous tile providers to be used to obtain map tiles. When a tile is requested, the MapTileProviderArray first checks the MapTileCache (synchronously) and returns the tile if available. If not, then the MapTileProviderArray returns null and sends the tile request through the asynchronous tile request chain. Each asynchronous tile provider returns success/failure to the MapTileProviderArray. If successful, the MapTileProviderArray passes the result to the base class. If failed, then the next asynchronous tile provider is called in the chain. If there are no more asynchronous tile providers in the chain, then the failure result is passed to the base class. The MapTileProviderArray provides a mechanism so that only one unique tile-request can be in the map tile request chain at a time.

    • Method Summary

      Modifier and Type Method Description
      void detach() classes that extend MapTileProviderBase must call this method to prevent memory leaks.Updated 5.
      boolean contains(long pTileIndex)
      Drawable getMapTile(long pMapTileIndex) Attempts to get a Drawable that represents a MapTileIndex.
      void mapTileRequestCompleted(MapTileRequestState aState, Drawable aDrawable) Called by implementation class methods indicating that they have completed the request asbest it can.
      void mapTileRequestFailed(MapTileRequestState aState) Called by implementation class methods indicating that they have failed to retrieve therequested map tile.
      void mapTileRequestFailedExceedsMaxQueueSize(MapTileRequestState aState) Called by implementation class methods indicating that they have failed to retrieve therequested map tile, because the max queue size has been reached
      void mapTileRequestExpiredTile(MapTileRequestState aState, Drawable aDrawable) Called by implementation class methods indicating that they have produced an expired resultthat can be used but better results may be delivered later.
      IFilesystemCache getTileWriter()
      long getQueueSize()
      boolean getProviderExists(MapTileModuleProviderBase provider)
      int getMinimumZoomLevel() Gets the minimum zoom level this tile provider can provide
      int getMaximumZoomLevel() Gets the maximum zoom level this tile provider can provide
      void setTileSource(ITileSource aTileSource) Sets the tile source for this tile provider.
      • Methods inherited from class org.osmdroid.tileprovider.MapTileProviderBase

        clearTileCache, createTileCache, ensureCapacity, expireInMemoryCache, getTileCache, getTileRequestCompleteHandlers, getTileSource, mapTileRequestCompleted, mapTileRequestExpiredTile, mapTileRequestFailed, mapTileRequestFailedExceedsMaxQueueSize, rescaleCache, setApproximationBackgroundColor, setTileLoadFailureImage, setTileRequestCompleteHandler, setTileSource, setUseDataConnection, useDataConnection
      • Methods inherited from class org.osmdroid.tileprovider.IMapTileProviderCallback

        mapTileRequestCompleted, mapTileRequestExpiredTile, mapTileRequestFailed, mapTileRequestFailedExceedsMaxQueueSize
      • Methods inherited from class org.osmdroid.util.MapTileContainer

        contains
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait