Package com.massifmaps.vectortiles
Class TorqueTileDecoder
java.lang.Object
com.massifmaps.vectortiles.VectorTileDecoder
com.massifmaps.vectortiles.TorqueTileDecoder
A decoder for Torque layer that accepts json-based Torque tiles.
-
Constructor Summary
ConstructorsConstructorDescriptionTorqueTileDecoder(CartoCSSStyleSet styleSet) Constructs a new TorqueTileDecoder given style. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFallbackFont(BinaryData fontData) Adds a fallback font.floatReturns the animation duration, in seconds.intReturns the frame count defined in the Torque style.intReturns maximum zoom level supported for by the decoder (or style).intReturns minimum zoom level supported for by the decoder (or style).intReturns the tile resolution, in pixels.Returns the current style set used by the decoder.voidsetStyleSet(CartoCSSStyleSet styleSet) Sets the current style set used by the decoder.Methods inherited from class com.massifmaps.vectortiles.VectorTileDecoder
equals, hashCode, notifyDecoderChanged, notifyDecoderRefreshed
-
Constructor Details
-
TorqueTileDecoder
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.
-
-
Method Details
-
getFrameCount
public int getFrameCount()Returns the frame count defined in the Torque style.- Returns:
- The frame count in the animation.
-
getResolution
public int getResolution()Returns the tile resolution, in pixels.- Returns:
- The tile resolution in pixels.
-
getAnimationDuration
public float getAnimationDuration()Returns the animation duration, in seconds.- Returns:
- The animation duration, in seconds.
-
getStyleSet
Returns the current style set used by the decoder.- Returns:
- The current style set.
-
setStyleSet
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.
-
addFallbackFont
Description copied from class:VectorTileDecoderAdds a fallback font. The font should be TTF or OTF font. It is used for glyphs not found in style defined fonts.- Overrides:
addFallbackFontin classVectorTileDecoder- Parameters:
fontData- The font binary.
-
getMinZoom
public int getMinZoom()Description copied from class:VectorTileDecoderReturns minimum zoom level supported for by the decoder (or style).- Overrides:
getMinZoomin classVectorTileDecoder- Returns:
- Minimum supported zoom level.
-
getMaxZoom
public int getMaxZoom()Description copied from class:VectorTileDecoderReturns maximum zoom level supported for by the decoder (or style).- Overrides:
getMaxZoomin classVectorTileDecoder- Returns:
- Maximum supported zoom level.
-