MapTileset Class

  • java.lang.Object
    • com.azure.maps.render.models.MapTileset

Implements

public final class MapTileset
implements JsonSerializable<MapTileset>

Metadata for a tileset in the TileJSON format.

Constructor Summary

Constructor Description
MapTileset()

Creates an instance of MapTileset class.

Method Summary

Modifier and Type Method and Description
static MapTileset fromJson(JsonReader jsonReader)

Reads an instance of MapTileset from the JsonReader.

String getAttribution()

Get the attribution property: Copyright attribution to be displayed on the map.

GeoBoundingBox getBounds()

Get the bounds property: The maximum extent of available map tiles.

GeoPosition getCenter()

Get the center property: The default location of the tileset in the form [longitude, latitude, zoom].

List<String> getData()

Get the data property: An array of data files in GeoJSON format.

String getDescription()

Get the description property: Text description of the tileset.

List<String> getGrids()

Get the grids property: An array of interactivity endpoints.

String getLegend()

Get the legend property: A legend to be displayed with the map.

Integer getMaxZoom()

Get the maxZoom property: The maximum zoom level.

Integer getMinZoom()

Get the minZoom property: The minimum zoom level.

String getName()

Get the name property: A name describing the tileset.

String getScheme()

Get the scheme property: Default: "xyz".

String getTemplate()

Get the template property: A mustache template to be used to format data from grids for interaction.

String getTilejson()

Get the tilejson property: Describes the version of the TileJSON spec that is implemented by this JSON object.

List<String> getTiles()

Get the tiles property: An array of tile endpoints.

String getVersion()

Get the version property: A semver.org style version number for the tiles contained within the tileset.

MapTileset setAttribution(String attribution)

Set the attribution property: Copyright attribution to be displayed on the map.

MapTileset setData(List<String> data)

Set the data property: An array of data files in GeoJSON format.

MapTileset setDescription(String description)

Set the description property: Text description of the tileset.

MapTileset setGrids(List<String> grids)

Set the grids property: An array of interactivity endpoints.

MapTileset setLegend(String legend)

Set the legend property: A legend to be displayed with the map.

MapTileset setMaxZoom(Integer maxZoom)

Set the maxZoom property: The maximum zoom level.

MapTileset setMinZoom(Integer minZoom)

Set the minZoom property: The minimum zoom level.

MapTileset setName(String name)

Set the name property: A name describing the tileset.

MapTileset setScheme(String scheme)

Set the scheme property: Default: "xyz".

MapTileset setTemplate(String template)

Set the template property: A mustache template to be used to format data from grids for interaction.

MapTileset setTilejson(String tilejson)

Set the tilejson property: Describes the version of the TileJSON spec that is implemented by this JSON object.

MapTileset setTiles(List<String> tiles)

Set the tiles property: An array of tile endpoints.

MapTileset setVersion(String version)

Set the version property: A semver.org style version number for the tiles contained within the tileset.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

MapTileset

public MapTileset()

Creates an instance of MapTileset class.

Method Details

fromJson

public static MapTileset fromJson(JsonReader jsonReader)

Reads an instance of MapTileset from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of MapTileset if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the MapTileset.

getAttribution

public String getAttribution()

Get the attribution property: Copyright attribution to be displayed on the map. Implementations MAY decide to treat this as HTML or literal text. For security reasons, make absolutely sure that this field can't be abused as a vector for XSS or beacon tracking.

Returns:

the attribution value.

getBounds

public GeoBoundingBox getBounds()

Get the bounds property: The maximum extent of available map tiles. Bounds MUST define an area covered by all zoom levels. The bounds are represented in WGS:84 latitude and longitude values, in the order left, bottom, right, top. Values may be integers or floating point numbers.

Returns:

the bounds value.

getCenter

public GeoPosition getCenter()

Get the center property: The default location of the tileset in the form [longitude, latitude, zoom]. The zoom level MUST be between minzoom and maxzoom. Implementations can use this value to set the default location.

Returns:

the center value.

getData

public List<String> getData()

Get the data property: An array of data files in GeoJSON format.

Returns:

the data value.

getDescription

public String getDescription()

Get the description property: Text description of the tileset. The description can contain any legal character. Implementations SHOULD NOT interpret the description as HTML.

Returns:

the description value.

getGrids

public List<String> getGrids()

Get the grids property: An array of interactivity endpoints.

Returns:

the grids value.

getLegend

public String getLegend()

Get the legend property: A legend to be displayed with the map. Implementations MAY decide to treat this as HTML or literal text. For security reasons, make absolutely sure that this field can't be abused as a vector for XSS or beacon tracking.

Returns:

the legend value.

getMaxZoom

public Integer getMaxZoom()

Get the maxZoom property: The maximum zoom level.

Returns:

the maxZoom value.

getMinZoom

public Integer getMinZoom()

Get the minZoom property: The minimum zoom level.

Returns:

the minZoom value.

getName

public String getName()

Get the name property: A name describing the tileset. The name can contain any legal character. Implementations SHOULD NOT interpret the name as HTML.

Returns:

the name value.

getScheme

public String getScheme()

Get the scheme property: Default: "xyz". Either "xyz" or "tms". Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.

Returns:

the scheme value.

getTemplate

public String getTemplate()

Get the template property: A mustache template to be used to format data from grids for interaction.

Returns:

the template value.

getTilejson

public String getTilejson()

Get the tilejson property: Describes the version of the TileJSON spec that is implemented by this JSON object.

Returns:

the tilejson value.

getTiles

public List<String> getTiles()

Get the tiles property: An array of tile endpoints. 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.

Returns:

the tiles value.

getVersion

public String getVersion()

Get the version property: A semver.org style version number for the tiles contained within the tileset. When changes across tiles are introduced, the minor version MUST change.

Returns:

the version value.

setAttribution

public MapTileset setAttribution(String attribution)

Set the attribution property: Copyright attribution to be displayed on the map. Implementations MAY decide to treat this as HTML or literal text. For security reasons, make absolutely sure that this field can't be abused as a vector for XSS or beacon tracking.

Parameters:

attribution - the attribution value to set.

Returns:

the MapTileset object itself.

setData

public MapTileset setData(List<String> data)

Set the data property: An array of data files in GeoJSON format.

Parameters:

data - the data value to set.

Returns:

the MapTileset object itself.

setDescription

public MapTileset setDescription(String description)

Set the description property: Text description of the tileset. The description can contain any legal character. Implementations SHOULD NOT interpret the description as HTML.

Parameters:

description - the description value to set.

Returns:

the MapTileset object itself.

setGrids

public MapTileset setGrids(List<String> grids)

Set the grids property: An array of interactivity endpoints.

Parameters:

grids - the grids value to set.

Returns:

the MapTileset object itself.

setLegend

public MapTileset setLegend(String legend)

Set the legend property: A legend to be displayed with the map. Implementations MAY decide to treat this as HTML or literal text. For security reasons, make absolutely sure that this field can't be abused as a vector for XSS or beacon tracking.

Parameters:

legend - the legend value to set.

Returns:

the MapTileset object itself.

setMaxZoom

public MapTileset setMaxZoom(Integer maxZoom)

Set the maxZoom property: The maximum zoom level.

Parameters:

maxZoom - the maxZoom value to set.

Returns:

the MapTileset object itself.

setMinZoom

public MapTileset setMinZoom(Integer minZoom)

Set the minZoom property: The minimum zoom level.

Parameters:

minZoom - the minZoom value to set.

Returns:

the MapTileset object itself.

setName

public MapTileset setName(String name)

Set the name property: A name describing the tileset. The name can contain any legal character. Implementations SHOULD NOT interpret the name as HTML.

Parameters:

name - the name value to set.

Returns:

the MapTileset object itself.

setScheme

public MapTileset setScheme(String scheme)

Set the scheme property: Default: "xyz". Either "xyz" or "tms". Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.

Parameters:

scheme - the scheme value to set.

Returns:

the MapTileset object itself.

setTemplate

public MapTileset setTemplate(String template)

Set the template property: A mustache template to be used to format data from grids for interaction.

Parameters:

template - the template value to set.

Returns:

the MapTileset object itself.

setTilejson

public MapTileset setTilejson(String tilejson)

Set the tilejson property: Describes the version of the TileJSON spec that is implemented by this JSON object.

Parameters:

tilejson - the tilejson value to set.

Returns:

the MapTileset object itself.

setTiles

public MapTileset setTiles(List<String> tiles)

Set the tiles property: An array of tile endpoints. 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.

Parameters:

tiles - the tiles value to set.

Returns:

the MapTileset object itself.

setVersion

public MapTileset setVersion(String version)

Set the version property: A semver.org style version number for the tiles contained within the tileset. When changes across tiles are introduced, the minor version MUST change.

Parameters:

version - the version value to set.

Returns:

the MapTileset object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to