Builder

Builder for TileSet.

open class Builder(tilejson: String, tiles: List<String>)

Constructors

Builder
Link copied to clipboard
fun Builder(tilejson: String, tiles: List<String>)

Functions

attribution
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",

fun attribution(value: String): TileSet.Builder
bounds
Link copied to clipboard

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 bounds(value: List<Double>): TileSet.Builder
build
Link copied to clipboard

Build the TileSet.

fun build(): TileSet
center
Link copied to clipboard

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. Longitude and latitude MUST be within the specified bounds. The zoom level MUST be between minzoom and maxzoom. 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 center(value: List<Double>): TileSet.Builder
data
Link copied to clipboard

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.

"http:localhost:8888/admin/data.geojson"

fun data(value: List<String>): TileSet.Builder
description
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."

fun description(value: String): TileSet.Builder
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
grids
Link copied to clipboard

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.

Example: "http:localhost:8888/admin/1.0.0/broadband/{z}/{x}/{y}.grid.json"

fun grids(value: List<String>): TileSet.Builder
hashCode
Link copied to clipboard
open override fun hashCode(): Int
legend
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"

fun legend(value: String): TileSet.Builder
maxZoom
Link copied to clipboard

Default to 30. &gt;= 0, &lt;= 22. An integer specifying the maximum zoom level.

fun maxZoom(value: Int): TileSet.Builder
minZoom
Link copied to clipboard

Default to 0. &gt;= 0, &lt; 22. An integer specifying the minimum zoom level.

fun minZoom(value: Int): TileSet.Builder
name
Link copied to clipboard

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

fun name(value: String): TileSet.Builder
scheme
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"

fun scheme(value: Scheme): TileSet.Builder
template
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}}"

fun template(value: String): TileSet.Builder
toString
Link copied to clipboard
open override fun toString(): String
version
Link copied to clipboard

Default: "1.0.0". A semver.org style version number. When changes across tiles are introduced, the minor version MUST change. This may lead to cut off labels. Therefore, implementors can decide to clean their cache when the minor version changes. Changes to the patch level MUST only have changes to tiles that are contained within one tile. When tiles change significantly, the major version MUST be increased. Implementations MUST NOT use tiles with different major versions.

fun version(value: String): TileSet.Builder

Properties

tilejson
Link copied to clipboard

val tilejson: String
tiles
Link copied to clipboard

val tiles: List<String>

Inheritors

TileSet
Link copied to clipboard