java.lang.Object | |||
↳ | com.carto.layers.Layer | ||
↳ | com.carto.layers.TileLayer | ||
↳ | com.carto.layers.VectorTileLayer |
![]() |
![]() |
A tile layer where each tile is a bitmap. Should be used together with corresponding data source.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
VectorTileLayer(TileDataSource dataSource, VectorTileDecoder decoder)
Constructs a VectorTileLayer object from a data source and tile decoder.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
synchronized void | delete() | ||||||||||
VectorTileRenderOrder |
getBuildingRenderOrder()
Returns the current display order of the buildings.
| ||||||||||
float |
getClickRadius()
Returns the click radius of vector tile features.
| ||||||||||
float |
getLabelBlendingSpeed()
Returns the current relative label blending speed.
| ||||||||||
VectorTileRenderOrder |
getLabelRenderOrder()
Returns the current display order of the labels.
| ||||||||||
float |
getLayerBlendingSpeed()
Returns the current relative layer blending speed.
| ||||||||||
long |
getTileCacheCapacity()
Returns the tile cache capacity.
| ||||||||||
VectorTileDecoder |
getTileDecoder()
Returns the tile decoder assigned to this layer.
| ||||||||||
VectorTileEventListener |
getVectorTileEventListener()
Returns the vector tile event listener.
| ||||||||||
void |
setBuildingRenderOrder(VectorTileRenderOrder renderOrder)
Sets the current display order of the buildings.
| ||||||||||
void |
setClickRadius(float radius)
Sets the click radius of vector tile features.
| ||||||||||
void |
setLabelBlendingSpeed(float speed)
Sets the relative label blending speed.
| ||||||||||
void |
setLabelRenderOrder(VectorTileRenderOrder renderOrder)
Sets the current display order of the labels.
| ||||||||||
void |
setLayerBlendingSpeed(float speed)
Sets the relative layer blending speed.
| ||||||||||
void |
setTileCacheCapacity(long capacityInBytes)
Sets the vector tile cache capacity.
| ||||||||||
void |
setVectorTileEventListener(VectorTileEventListener eventListener)
Sets the vector tile event listener.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs a VectorTileLayer object from a data source and tile decoder.
dataSource | The data source from which this layer loads data. |
---|---|
decoder | The tile decoder that decoder loaded tiles and applies styles. |
Returns the current display order of the buildings.
Returns the click radius of vector tile features.
Units are screen density independent pixels (DP or DIP).
Returns the current relative label blending speed.
Returns the current display order of the labels.
Returns the current relative layer blending speed.
Returns the tile cache capacity.
Returns the tile decoder assigned to this layer.
Returns the vector tile event listener.
Sets the current display order of the buildings.
renderOrder | The new display order of the labels. |
---|
Sets the click radius of vector tile features.
The click radius is applied as an extra buffer to the vector tile features to make clicking on small features less sensitive.
Units are screen density independent pixels (DP or DIP).
radius | The new click radius of vector tile features. The default value is 4. |
---|
Sets the relative label blending speed.
speed | The new relative speed value. Default is 1.0. Use zero or negative values to disable blending. |
---|
Sets the current display order of the labels.
renderOrder | The new display order of the labels. |
---|
Sets the relative layer blending speed.
speed | The new relative speed value. Default is 1.0. Use zero or negative values to disable blending. |
---|
Sets the vector tile cache capacity. Tile cache is the primary storage for vector data,
all tiles contained within the cache are stored as uncompressed vertex buffers 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.
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 vector tile event listener.
eventListener | The vector tile event listener. |
---|