java.lang.Object | |||
↳ | com.carto.layers.Layer | ||
↳ | com.carto.layers.TileLayer | ||
↳ | com.carto.layers.RasterTileLayer |
![]() |
A tile layer where each tile is a bitmap. Should be used together with corresponding data source.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
RasterTileLayer(TileDataSource dataSource)
Constructs a RasterTileLayer object from a data source.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
synchronized void | delete() | ||||||||||
RasterTileEventListener |
getRasterTileEventListener()
Returns the raster tile event listener.
| ||||||||||
long |
getTextureCacheCapacity()
Returns the tile texture cache capacity.
| ||||||||||
float |
getTileBlendingSpeed()
Returns the current relative tile blending speed.
| ||||||||||
RasterTileFilterMode |
getTileFilterMode()
Returns the current tile filter mode.
| ||||||||||
void |
setRasterTileEventListener(RasterTileEventListener eventListener)
Sets the raster tile event listener.
| ||||||||||
void |
setTextureCacheCapacity(long capacityInBytes)
Sets the tile texture cache capacity.
| ||||||||||
void |
setTileBlendingSpeed(float speed)
Sets the relative tile blending speed.
| ||||||||||
void |
setTileFilterMode(RasterTileFilterMode filterMode)
Sets the current tile filter mode.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs a RasterTileLayer object from a data source.
dataSource | The data source from which this layer loads data. |
---|
Returns the raster tile event listener.
Returns the tile texture cache capacity.
Returns the current relative tile blending speed.
Returns the current tile filter mode.
Sets the raster tile event listener.
eventListener | The raster tile event listener. |
---|
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.
capacityInBytes | The new tile bitmap cache capacity in bytes. |
---|
Sets the relative tile blending speed.
speed | The new relative speed value. Default is 1.0. Use zero or negative values to disable blending. |
---|
Sets the current tile filter mode.
filterMode | The new tile filter mode. |
---|