Package org.geotools.mbstyle.source
Class TileMBSource
-
- Direct Known Subclasses:
RasterMBSource
,VectorMBSource
public abstract class TileMBSource extends MBSource
Wrapper around aJSONObject
holding a tiled Mapbox source. Tiled sources (vector and raster) must specify their details in terms of the TileJSON specification.
-
-
Constructor Summary
Constructors Constructor Description TileMBSource(JSONObject json)
TileMBSource(JSONObject json, MBObjectParser parser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Number
getMaxZoom()
(Optional) Defaults to 22.Number
getMinZoom()
(Optional) Defaults to 0.List<String>
getTiles()
(Optional) An array of one or more tile source URLs, as in the TileJSON spec.String
getUrl()
(Optional) A URL to a TileJSON resource.
-
-
-
Constructor Detail
-
TileMBSource
public TileMBSource(JSONObject json)
-
TileMBSource
public TileMBSource(JSONObject json, MBObjectParser parser)
-
-
Method Detail
-
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
-
-