TileSet

class TileSet(val tilejson: String, tiles: String)

Tile set, allows using TileJson specification as source. Note that encoding is only relevant to raster-dem sources, and is not supported in the TileJson spec.

See also

Constructors

Link copied to clipboard
constructor(tilejson: String, vararg tiles: String)

Properties

Link copied to clipboard

Default: null. Contains an attribution to be displayed when the map is shown to a user. 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. "attribution": "OSM contributors",

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A text description of the tileset. The description can contain any legal character. Implementations SHOULD NOT interpret the description as HTML. "description": "A simple, light grey world."

Link copied to clipboard

Default: "mapbox". The encoding formula for a raster-dem tileset. Supported values are "mapbox" and "terrarium".

Link copied to clipboard
Link copied to clipboard

Contains 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. "legend": "Dangerous zones are red, safe zones are green"

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var name: String?

A name describing the tileset. The name can contain any legal character. Implementations SHOULD NOT interpret the name as HTML. "name": "compositing",

Link copied to clipboard

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

Link copied to clipboard

Contains a mustache template to be used to format data from grids for interaction. See https:github.com/mapbox/utfgrid-spec/tree/master/1.2 for the interactivity specification. "template": "{{#teaser}}{{NAME}}{{/teaser}}"

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun setBounds(@Size(value = 4) bounds: FloatArray)

Default: -180, -90, 180, 90. 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, as a Float array of exactly four elements in the order left, bottom, right, top. They are all floating point numbers.

fun setBounds(@Size(value = 4) vararg bounds: Float)

Default: -180, -90, 180, 90. 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.

fun setBounds(bounds: LatLngBounds)

Default: -180, -90, 180, 90. The maximum extent of available map tiles. Bounds MUST define an area covered by all zoom levels. The bounds are represented in WGS:84

fun setBounds(left: Float, bottom: Float, right: Float, top: Float)

Default: -180, -90, 180, 90. 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 are floating point numbers.

Link copied to clipboard
fun setCenter(@Size(value = 2) vararg center: Float)

The first value is the longitude, the second is latitude (both in WGS:84 values), Longitude and latitude MUST be within the specified bounds. Implementations can use this value to set the default location. If the value is null, implementations may use their own algorithm for determining a default location.

fun setCenter(center: LatLng)

Set the center. Longitude and latitude MUST be within the specified bounds. Implementations can use this value to set the default location. If the value is null, implementations may use their own algorithm for determining a default location.

Link copied to clipboard
fun setData(vararg data: String)

An array of data files in GeoJSON format. {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. If the array doesn't contain any entries, then no data is present in the map.

Link copied to clipboard
fun setGrids(vararg grids: String)

An array of interactivity 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. If the array doesn't contain any entries, interactivity is not supported for this tileset. See https:github.com/mapbox/utfgrid-spec/tree/master/1.2 for the interactivity specification.

Link copied to clipboard
fun setMaxZoom(maxZoom: Float)
Link copied to clipboard
fun setMinZoom(minZoom: Float)
Link copied to clipboard