Package org.geotools.mbstyle.source
Class MBSource
Object
MBSource
- Direct Known Subclasses:
GeoJsonMBSource
,MediaMBSource
,TileMBSource
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::
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MBSource
create
(JSONObject json, MBObjectParser parser) abstract String
getType()
Type of source.
-
Field Details
-
json
protected final JSONObject json -
parser
-
-
Constructor Details
-
MBSource
public MBSource(JSONObject json) -
MBSource
-
-
Method Details
-
create
-
getType
Type of source.- Returns:
- One of "vector", "raster", "geojson", "image", "video", "canvas".
-