public class TileSet extends Object
Constructor and Description |
---|
TileSet(String tilejson,
String... tiles) |
Modifier and Type | Method and Description |
---|---|
String |
getAttribution() |
Float[] |
getBounds() |
Float[] |
getCenter() |
String[] |
getData() |
String |
getDescription() |
String |
getEncoding() |
String[] |
getGrids() |
String |
getLegend() |
float |
getMaxZoom() |
float |
getMinZoom() |
String |
getName() |
String |
getScheme() |
String |
getTemplate() |
String |
getTilejson() |
String[] |
getTiles() |
String |
getVersion() |
void |
setAttribution(String attribution)
Default: null.
|
void |
setBounds(Float... bounds)
Default: [-180, -90, 180, 90].
|
void |
setCenter(Float... center)
The first value is the longitude, the second is latitude (both in
WGS:84 values), the third value is the zoom level as an integer.
|
void |
setCenter(LatLng center) |
void |
setData(String... data)
An array of data files in GeoJSON format.
|
void |
setDescription(String description)
A text description of the tileset.
|
void |
setEncoding(String encoding)
Default: "mapbox".
|
void |
setGrids(String... grids)
An array of interactivity endpoints.
|
void |
setLegend(String legend)
Contains a legend to be displayed with the map.
|
void |
setMaxZoom(float maxZoom)
0.
|
void |
setMinZoom(float minZoom)
0.
|
void |
setName(String name)
A name describing the tileset.
|
void |
setScheme(String scheme)
Default: "xyz".
|
void |
setTemplate(String template)
Contains a mustache template to be used to
format data from grids for interaction.
|
void |
setVersion(String version) |
public TileSet(String tilejson, String... tiles)
tilejson
- A semver.org style version number. Describes the version of the TileJSON spec that is implemented
by this JSON object.tiles
- An array of tile endpoints. {z}, {x} and {y}, if present, are replaced with the corresponding
integers.
If multiple endpoints are specified, clients may use any combination of endpoints. All endpoints
MUST return the same
content for the same URL. The array MUST contain at least one endpoint.
Example: "http:localhost:8888/admin/1.0.0/world-light,broadband/{z}/{x}/{y}.png"public String getTilejson()
public String getName()
public void setName(String name)
name
- the name to be setpublic String getDescription()
public void setDescription(String description)
description
- the description to setpublic String getVersion()
public void setVersion(String version)
public String getAttribution()
public void setAttribution(String attribution)
attribution
- the attribution to setpublic String getTemplate()
public void setTemplate(String template)
template
- the template to setpublic String getLegend()
public void setLegend(String legend)
legend
- the legend to setpublic String getScheme()
public void setScheme(String scheme)
scheme
- the scheme to setpublic String[] getTiles()
public String[] getGrids()
public void setGrids(String... grids)
Example: "http:localhost:8888/admin/1.0.0/broadband/{z}/{x}/{y}.grid.json"
grids
- the grids to setpublic String[] getData()
public void setData(String... data)
"http:localhost:8888/admin/data.geojson"
data
- the data array to setpublic float getMinZoom()
public void setMinZoom(float minZoom)
minZoom
- the minZoom level to setpublic float getMaxZoom()
public void setMaxZoom(float maxZoom)
maxZoom
- the maxZoom level to setpublic Float[] getBounds()
public void setBounds(Float... bounds)
bounds
- the Float array to setpublic String getEncoding()
public void setEncoding(String encoding)
encoding
- the String encoding formula to setpublic Float[] getCenter()
public void setCenter(Float... center)
center
- the Float array to setpublic void setCenter(LatLng center)
© 2015–2019 Mapbox. All rights reserved.