MTRasterTileSource

A raster tile source. Tiles must be in ZXY or TMS tile format. For raster tiles hosted by MapTiler, the URL should be of the form: https://api.maptiler.com/tiles/[tilesetid]/tiles.json?key=

Constructors

constructor(identifier: String, attribution: String?, bounds: DoubleArray, maxZoom: Double, minZoom: Double, tiles: Array<URL>?, url: URL?, type: MTSourceType, scheme: MTTileScheme, tileSize: Int)
constructor(identifier: String, url: URL)

Properties

open override var attribution: String?

Attribution to be displayed when the map is shown to a user.

open override var bounds: DoubleArray

An array containing the longitude and latitude of the southwest and northeast corners of the source’s bounding box in the following order: sw.lng, sw.lat, ne.lng, ne.lat. Defaults to -180, -85.051129, 180, 85.051129.

open override var identifier: String

Unique identifier of a source.

open override var maxZoom: Double

Maximum zoom level for which tiles are available. Defaults to 22.

open override var minZoom: Double

Minimum zoom level for which tiles are available. Defaults to 0.

Scheme used for tiles. Influences the y direction of the tile coordinates. Defaults to XYZ.

open override var tiles: Array<URL>?

An array of one or more tile source URLs.

Tile size in pixels. Only configurable for raster sources. Defaults to 512.

open override var type: MTSourceType

Type of the source.

open override var url: URL?

A URL to a TileJSON resource. Supported protocols are http, https.

Functions

fun setTiles(tiles: Array<URL>, mapViewController: MTMapViewController)

Sets the tiles of the source. Used for updating the source data.

fun setURL(url: URL, mapViewController: MTMapViewController)

Sets the url of the source. Used for updating the source data.