Package org.geotools.mbstyle.source
Class MBSource
- Object
-
- MBSource
-
- Direct Known Subclasses:
GeoJsonMBSource
,MediaMBSource
,TileMBSource
public abstract class MBSource extends Object
Wrapper around aJSONObject
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::http://localhost:8080/geoserver/gwc/service/wmts? REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0& LAYER=dfs:ne_110m_coastline&STYLE=&TILEMATRIX=EPSG:4326:2&TILEMATRIXSET=EPSG:4326& FORMAT=application/x-protobuf;type=mapbox-vector &TILECOL=3&TILEROW=1
-
-
Field Summary
Fields Modifier and Type Field Description protected JSONObject
json
protected MBObjectParser
parser
-
Constructor Summary
Constructors Constructor Description MBSource(JSONObject json)
MBSource(JSONObject json, MBObjectParser parser)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static MBSource
create(JSONObject json, MBObjectParser parser)
abstract String
getType()
Type of source.
-
-
-
Field Detail
-
json
protected final JSONObject json
-
parser
protected final MBObjectParser parser
-
-
Constructor Detail
-
MBSource
public MBSource(JSONObject json)
-
MBSource
public MBSource(JSONObject json, MBObjectParser parser)
-
-
Method Detail
-
create
public static MBSource create(JSONObject json, MBObjectParser parser)
-
getType
public abstract String getType()
Type of source.- Returns:
- One of "vector", "raster", "geojson", "image", "video", "canvas".
-
-