Class TorqueTileDecoder

java.lang.Object
com.massifmaps.vectortiles.VectorTileDecoder
com.massifmaps.vectortiles.TorqueTileDecoder

public class TorqueTileDecoder extends VectorTileDecoder
A decoder for Torque layer that accepts json-based Torque tiles.
  • Constructor Details

    • TorqueTileDecoder

      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.
  • 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

      public CartoCSSStyleSet getStyleSet()
      Returns the current style set used by the decoder.
      Returns:
      The current style set.
    • setStyleSet

      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.
    • addFallbackFont

      public void addFallbackFont(BinaryData fontData)
      Description copied from class: VectorTileDecoder
      Adds a fallback font. The font should be TTF or OTF font. It is used for glyphs not found in style defined fonts.
      Overrides:
      addFallbackFont in class VectorTileDecoder
      Parameters:
      fontData - The font binary.
    • getMinZoom

      public int getMinZoom()
      Description copied from class: VectorTileDecoder
      Returns minimum zoom level supported for by the decoder (or style).
      Overrides:
      getMinZoom in class VectorTileDecoder
      Returns:
      Minimum supported zoom level.
    • getMaxZoom

      public int getMaxZoom()
      Description copied from class: VectorTileDecoder
      Returns maximum zoom level supported for by the decoder (or style).
      Overrides:
      getMaxZoom in class VectorTileDecoder
      Returns:
      Maximum supported zoom level.