Package com.massifmaps.layers
Class RasterTileLayer
java.lang.Object
com.massifmaps.layers.Layer
com.massifmaps.layers.TileLayer
com.massifmaps.layers.RasterTileLayer
- Direct Known Subclasses:
CustomRasterTileLayer
A tile layer where each tile is a bitmap. Should be used together with corresponding data source.
-
Constructor Summary
ConstructorsConstructorDescriptionRasterTileLayer(TileDataSource dataSource) Constructs a RasterTileLayer object from a data source. -
Method Summary
Modifier and TypeMethodDescriptionReturns the raster tile event listener.longReturns the tile texture cache capacity.floatReturns the current relative tile blending speed.intReturns the current tile filter mode.voidsetRasterTileEventListener(RasterTileEventListener eventListener) Sets the raster tile event listener.voidsetTextureCacheCapacity(long capacityInBytes) Sets the tile texture cache capacity.voidsetTileBlendingSpeed(float speed) Sets the relative tile blending speed.voidsetTileFilterMode(int filterMode) Sets the current tile filter mode.Methods inherited from class com.massifmaps.layers.TileLayer
bakeDrapeCoverage, bakeGroundAOMask, bakeSpanDrapeTile, calculateMapTile, calculateMapTileBounds, calculateMapTileOrigin, clearTileCaches, collectDrapeStackOrder, collectSpanDrapeTiles, consumeShadowCastersMissingElevation, getDataSource, getFrameNr, getMaxOverzoomLevel, getMaxStandInLevel, getMaxUnderzoomLevel, getPreloadingTileCount, getProjection, getTileLoadListener, getTileSubstitutionPolicy, getUTFGridDataSource, getUTFGridEventListener, getVisibleTileCount, getZoomLevelBias, isGroundAOActive, isGroundAOBakeable, isLabelOcclusionWanted, isPreloading, isSynchronizedRefresh, isTerrainDecodeSettled, isUpdateInProgress, renderGroundAOMask, renderLabelOcclusionDepth, renderTerrainShadowMask, setDrapeCoverageMasks, setFrameNr, setGroundDrapeTextures, setLabelOcclusionDepth, setMaxOverzoomLevel, setMaxStandInLevel, setMaxUnderzoomLevel, setPreloading, setSpanDrapeTextures, setSynchronizedRefresh, setTerrainShadowMask, setTileLoadListener, setTileSubstitutionPolicy, setUTFGridDataSource, setUTFGridEventListener, setZoomLevelBiasMethods inherited from class com.massifmaps.layers.Layer
containsMetaDataKey, equals, getMetaData, getMetaDataElement, getOpacity, getUpdatePriority, getVisibleZoomRange, hashCode, isPostProcessed, isVisible, refresh, setCullDelay, setMetaData, setMetaDataElement, setOpacity, setPostProcessed, setUpdatePriority, setVisible, setVisibleZoomRange, simulateClick, update
-
Constructor Details
-
RasterTileLayer
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
Returns the raster tile event listener.- Returns:
- The raster tile event listener.
-
setRasterTileEventListener
Sets the raster tile event listener.- Parameters:
eventListener- The raster tile event listener.
-