public class

TorqueTileDecoder

extends VectorTileDecoder
java.lang.Object
   ↳ com.carto.vectortiles.VectorTileDecoder
     ↳ com.carto.vectortiles.TorqueTileDecoder

Class Overview

A decoder for Torque layer that accepts json-based Torque tiles.

Summary

Public Constructors
TorqueTileDecoder(CartoCSSStyleSet styleSet)
Constructs a new TorqueTileDecoder given style.
Public Methods
void addFallbackFont(BinaryData fontData)
Adds a fallback font.
synchronized void delete()
float getAnimationDuration()
Returns the animation duration, in seconds.
int getFrameCount()
Returns the frame count defined in the Torque style.
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).
int getResolution()
Returns the tile resolution, in pixels.
CartoCSSStyleSet getStyleSet()
Returns the current style set used by the decoder.
void setStyleSet(CartoCSSStyleSet styleSet)
Sets the current style set used by the decoder.
[Expand]
Inherited Methods
From class com.carto.vectortiles.VectorTileDecoder
From class java.lang.Object

Public Constructors

public TorqueTileDecoder (CartoCSSStyleSet styleSet)

Constructs a new TorqueTileDecoder given style.

Parameters
styleSet The style set used by decoder.
Throws
Exception If the decoder could not be created or there are issues with the style set.

Public Methods

public void addFallbackFont (BinaryData fontData)

Adds a fallback font. The font should be TTF or OTF font. It is used for glyphs not found in style defined fonts.

Parameters
fontData The font binary.

public synchronized void delete ()

public float getAnimationDuration ()

Returns the animation duration, in seconds.

Returns
  • The animation duration, in seconds.

public int getFrameCount ()

Returns the frame count defined in the Torque style.

Returns
  • The frame count in the animation.

public int getMaxZoom ()

Returns maximum zoom level supported for by the decoder (or style).

Returns
  • Maximum supported zoom level.

public int getMinZoom ()

Returns minimum zoom level supported for by the decoder (or style).

Returns
  • Minimum supported zoom level.

public int getResolution ()

Returns the tile resolution, in pixels.

Returns
  • The tile resolution in pixels.

public CartoCSSStyleSet getStyleSet ()

Returns the current style set used by the decoder.

Returns
  • The current style set.

public void setStyleSet (CartoCSSStyleSet styleSet)

Sets the current style set used by the decoder.

Parameters
styleSet The new style set to use.
Throws
Exception If the decoder could not be updated or there are issues with the style set.