Class UrlTileGenerator


  • public class UrlTileGenerator
    extends TileGenerator
    Creates a set of tiles within a GeoPackage by downloading the tiles from a URL
    • Constructor Detail

      • UrlTileGenerator

        public UrlTileGenerator​(Context context,
                                GeoPackage geoPackage,
                                String tableName,
                                String tileUrl,
                                int minZoom,
                                int maxZoom,
                                BoundingBox boundingBox,
                                Projection projection)
        Constructor
        Parameters:
        context - app context
        geoPackage - GeoPackage
        tableName - table name
        tileUrl - tile url
        minZoom - min zoom
        maxZoom - max zoom
        boundingBox - tiles bounding box
        projection - tiles projection
        Since:
        1.3.0
    • Method Detail

      • isTms

        public boolean isTms()
        Is TMS URL
        Returns:
        true if TMS URL
        Since:
        1.2.1
      • setTms

        public void setTms​(boolean tms)
        Set the TMS URL flag
        Parameters:
        tms - true if a TMS URL
        Since:
        1.2.1
      • preTileGeneration

        protected void preTileGeneration()
        Called after set up and right before tile generation starts for the first zoom level
        Specified by:
        preTileGeneration in class TileGenerator
      • createTile

        protected byte[] createTile​(int z,
                                    long x,
                                    long y)
        Create the tile
        Specified by:
        createTile in class TileGenerator
        Parameters:
        z - zoom level
        x - x coordinate
        y - y coordinate
        Returns:
        tile bytes