Class CanvasMBSource

Object
MBSource
MediaMBSource
CanvasMBSource

public class CanvasMBSource extends MediaMBSource
Wrapper around a JSONObject containing a Mapbox canvas source.
See Also:
  • Constructor Details

    • CanvasMBSource

      public CanvasMBSource(JSONObject json)
    • CanvasMBSource

      public CanvasMBSource(JSONObject json, MBObjectParser parser)
  • Method Details

    • getCanvas

      public String getCanvas()
      (Required) HTML ID of the canvas from which to read pixels.
      Returns:
      String value for the HTML ID
    • getAnimate

      public Boolean getAnimate()
      (Optional) Defaults to true. Whether the canvas source is animated. If the canvas is static, animate should be set to false to improve performance.
      Returns:
      Boolean for whether the source is animated, defaulting to true.
    • getType

      public String getType()
      Description copied from class: MBSource
      Type of source.
      Specified by:
      getType in class MBSource
      Returns:
      One of "vector", "raster", "geojson", "image", "video", "canvas".