Class OfflineTileFactory<T>


  • public abstract class OfflineTileFactory<T>
    extends DefaultTileFactory<T,​Tile<T>>
    Copied some code from AbstractTileFactory, so I can use own TileRunner, which does all the reading and writing to the cache
    Author:
    Frantisek Post
    • Constructor Detail

      • OfflineTileFactory

        public OfflineTileFactory​(TileFactoryInfo tileFactoryInfo)
        Constructor
        Parameters:
        tileFactoryInfo -
    • Method Detail

      • getTile

        public Tile<T> getTile​(int x,
                               int y,
                               int zoom)
        Description copied from class: AbstractTileFactory
        Returns the tile that is located at the given tilePoint for this zoom. For example, if getMapSize() returns 10x20 for this zoom, and the tilePoint is (3,5), then the appropriate tile will be located and returned.
        Overrides:
        getTile in class AbstractTileFactory<T,​Tile<T>>
        zoom - the current zoom level
        Returns:
        the tile that is located at the given tilePoint for this zoom level. For example, if getMapSize() returns 10x20 for this zoom, and the tilePoint is (3,5), then the appropriate tile will be located and returned. This method must not return null. However, it can return dummy tiles that contain no data if it wants. This is appropriate, for example, for tiles which are outside of the bounds of the map and if the factory doesn't implement wrapping.
      • createOfflineTile

        protected abstract Tile<T> createOfflineTile​(int tileX,
                                                     int tileY,
                                                     int zoom,
                                                     String url)
        Method for creating offline Tile
        Parameters:
        tileX - x coordinates
        tileY - y coordinates
        zoom - zoom level
        url - tile url
        Returns:
        created offline tile