java.lang.Object | ||
↳ | com.carto.vectortiles.VectorTileDecoder | |
↳ | com.carto.vectortiles.CartoVectorTileDecoder |
Decoder for Carto vector tiles in MapBox format.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CartoVectorTileDecoder(StringVector layerIds, StringCartoCSSStyleSetMap layerStyleSets)
Constructs a decoder for Carto vector tiles based on specified CartoCSS style set.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addFallbackFont(BinaryData fontData)
Adds a fallback font.
| ||||||||||
synchronized void | delete() | ||||||||||
StringVector |
getLayerIds()
Returns the list of layer ids used when decoding a tile.
| ||||||||||
CartoCSSStyleSet |
getLayerStyleSet(String layerId)
Returns the CartoCSS style set used by the decoder for the specified layer.
| ||||||||||
int |
getMaxZoom()
Returns maximum zoom level supported for by the decoder (or style).
| ||||||||||
int |
getMinZoom()
Returns minimum zoom level supported for by the decoder (or style).
| ||||||||||
boolean |
isLayerVisible(String layerId)
Returns the visibility of the specified layer.
| ||||||||||
void |
setLayerStyleSet(String layerId, CartoCSSStyleSet styleSet)
Sets the CartoCSS style set used by the decoder for the specified layer.
| ||||||||||
void |
setLayerVisible(String layerId, boolean visible)
Sets the visibility of the specified layer.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Constructs a decoder for Carto vector tiles based on specified CartoCSS style set.
layerIds | The list of layer ids. |
---|---|
layerStyleSets | The CartoCSS style sets for the layers. |
Exception | If the decoder could not be created or there are issues with the style set. |
---|
Adds a fallback font. The font should be TTF or OTF font. It is used for glyphs not found in style defined fonts.
fontData | The font binary. |
---|
Returns the list of layer ids used when decoding a tile.
Returns the CartoCSS style set used by the decoder for the specified layer.
layerId | The layer name to use. |
---|
IndexOutOfBoundsException | If the layer id is not valid. |
---|
Returns maximum zoom level supported for by the decoder (or style).
Returns minimum zoom level supported for by the decoder (or style).
Returns the visibility of the specified layer.
layerId | The layer name to use. |
---|
Sets the CartoCSS style set used by the decoder for the specified layer.
layerId | The layer name to use. |
---|---|
styleSet | The new style set to use. |
Exception | If the decoder could not be updated or there are issues with the CartoCSS. |
---|---|
IndexOutOfBoundsException | If the layer id is not valid. |
Sets the visibility of the specified layer.
layerId | The layer name to use. |
---|---|
visible | True if the layer should be visible, false if hidden. |