public abstract class MBSource extends Object
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
Modifier and Type | Field and Description |
---|---|
protected JSONObject |
json |
protected MBObjectParser |
parser |
Constructor and Description |
---|
MBSource(JSONObject json) |
MBSource(JSONObject json,
MBObjectParser parser) |
Modifier and Type | Method and Description |
---|---|
static MBSource |
create(JSONObject json,
MBObjectParser parser) |
abstract String |
getType()
Type of source.
|
protected final JSONObject json
protected final MBObjectParser parser
public MBSource(JSONObject json)
public MBSource(JSONObject json, MBObjectParser parser)
public static MBSource create(JSONObject json, MBObjectParser parser)
public abstract String getType()
Copyright © 1996–2022 Geotools. All rights reserved.