Class RasterTileLayer

Direct Known Subclasses:
CustomRasterTileLayer

public class RasterTileLayer extends TileLayer
A tile layer where each tile is a bitmap. Should be used together with corresponding data source.
  • Constructor Details

    • RasterTileLayer

      public RasterTileLayer(TileDataSource dataSource)
      Constructs a RasterTileLayer object from a data source.
      Parameters:
      dataSource - The data source from which this layer loads data.
  • Method Details

    • getTextureCacheCapacity

      public long getTextureCacheCapacity()
      Returns the tile texture cache capacity.
      Returns:
      The tile texture cache capacity in bytes.
    • setTextureCacheCapacity

      public void setTextureCacheCapacity(long capacityInBytes)
      Sets the tile texture cache capacity. Texture cache is the primary storage for raster data,
      all tiles contained within the texture cache are stored as uncompressed openGL textures and can immediately be
      drawn to the screen. Setting the cache size too small may cause artifacts, such as disappearing tiles.
      The more tiles are visible on the screen, the larger this cache should be. A single opaque 256x256 tile takes
      up 192KB of memory, a transparent tile of the same size takes 256KB. The number of tiles on the screen depends
      on the screen size and density, current rotation and tilt angle, tile draw size parameter and
      whether or not preloading is enabled.
      The default is 10MB, which should be enough for most use cases with preloading enabled. If preloading is
      disabled, the cache size should be reduced by the user to conserve memory.
      Parameters:
      capacityInBytes - The new tile bitmap cache capacity in bytes.
    • getTileFilterMode

      public int getTileFilterMode()
      Returns the current tile filter mode.
      Returns:
      The current tile filter mode. The default is bilinear.
    • setTileFilterMode

      public void setTileFilterMode(int filterMode)
      Sets the current tile filter mode.
      Parameters:
      filterMode - The new tile filter mode.
    • getTileBlendingSpeed

      public float getTileBlendingSpeed()
      Returns the current relative tile blending speed.
      Returns:
      The current relative tile blending speed. Default is 1.0.
    • setTileBlendingSpeed

      public void setTileBlendingSpeed(float speed)
      Sets the relative tile blending speed.
      Parameters:
      speed - The new relative speed value. Default is 1.0. Use zero or negative values to disable blending.
    • getRasterTileEventListener

      public RasterTileEventListener getRasterTileEventListener()
      Returns the raster tile event listener.
      Returns:
      The raster tile event listener.
    • setRasterTileEventListener

      public void setRasterTileEventListener(RasterTileEventListener eventListener)
      Sets the raster tile event listener.
      Parameters:
      eventListener - The raster tile event listener.