Class TileMBSource

Object
MBSource
TileMBSource
Direct Known Subclasses:
RasterMBSource, VectorMBSource

public abstract class TileMBSource extends MBSource
Wrapper around a JSONObject holding a tiled Mapbox source. Tiled sources (vector and raster) must specify their details in terms of the TileJSON specification.
See Also:
  • Constructor Details

    • TileMBSource

      public TileMBSource(JSONObject json)
    • TileMBSource

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

    • getUrl

      public String getUrl()
      (Optional) A URL to a TileJSON resource. Supported protocols are http:, https:, and mapbox://<mapid>.
      Returns:
      A String for the URL.
    • getTiles

      public List<String> getTiles()
      (Optional) An array of one or more tile source URLs, as in the TileJSON spec.
      Returns:
      A list for the tile source URLs; empty list by default.
    • getMinZoom

      public Number getMinZoom()
      (Optional) Defaults to 0. Minimum zoom level for which tiles are available, as in the TileJSON spec.
      Returns:
      Number for the min zoom, defaulting to 0
    • getMaxZoom

      public Number getMaxZoom()
      (Optional) Defaults to 22. Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.
      Returns:
      Number for the max zoom, defaulting to 22