Class MBSource

  • Direct Known Subclasses:
    GeoJsonMBSource, MediaMBSource, TileMBSource

    public abstract class MBSource
    extends Object
    Wrapper around a JSONObject containing the "sources" in a Mapbox style. Mapbox sources supply data to be shown on the map. The type of source is specified by the "type" property, and must be one of vector, raster, geojson, image, video, canvas.

    "Layers refer to a source and give it a visual representation. This makes it possible to style the same source in different ways, like differentiating between types of roads in a highways layer."

    Internally we use a wtms end-point to refer to the data source:

     "us-states": {
        "type": "vector",
        "url": "https://localhost:8080/geoserver/gwc/service/wmts#us:states"
    This is based on the following request for a single file::
    See Also:
    • Field Detail

      • json

        protected final JSONObject json
    • Constructor Detail

      • MBSource

        public MBSource​(JSONObject json)
      • MBSource

        public MBSource​(JSONObject json,
                        MBObjectParser parser)
    • Method Detail

      • getType

        public abstract String getType()
        Type of source.
        One of "vector", "raster", "geojson", "image", "video", "canvas".