VectorSourceSpecification

A vector tile source. Tiles must be in Mapbox Vector Tile format. All geometric coordinates in vector tiles must be between -1 * extent and (extent * 2) - 1 inclusive. All layers that use a vector source must specify a source-layer value. Note that features are only rendered within their originating tile, which may lead to visual artifacts when large values for width, radius, size or offset are specified. To mitigate rendering issues, either reduce the value of the property causing the artifact or, if you have control over the tile generation process, increase the buffer size to ensure that features are fully rendered within the tile.

See MapLibre Style Spec.

Properties

Link copied to clipboard
abstract var attribution: String?

Contains an attribution to be displayed when map is shown to a user.

Link copied to clipboard
abstract var bounds: Array<Double>?

An array containing longitude and latitude of southwest and northeast corners of source's bounding box in following order: sw.lng, sw.lat, ne.lng, ne.lat. When this property is included in a source, no tiles outside of given bounds are requested by MapLibre. Defaults to -180, -85.051129, 180, 85.051129

Link copied to clipboard
abstract var encoding: String?

The encoding used by this source. Mapbox Vector Tiles encoding is used by default. Defaults to "mvt".

Link copied to clipboard
abstract var maxzoom: Int?

Maximum zoom level for which tiles are available, as in TileJSON spec. Data from tiles at maxzoom are used when displaying map at higher zoom levels. Defaults to 22

Link copied to clipboard
abstract var minzoom: Int?

Minimum zoom level for which tiles are available, as in TileJSON spec.

Link copied to clipboard

A property to use as a feature id (for feature state). Either a property name, or an object of form {<sourceLayer>: <propertyName>}. If specified as a string for a vector tile source, same property is used across all its source layers.

Link copied to clipboard
abstract var scheme: String?

Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed. Defaults to "xyz".

Link copied to clipboard
abstract var tiles: Array<String>?

An array of one or more tile source URLs, as in TileJSON spec.

Link copied to clipboard
abstract var type: String

The source type: "geojson", "vector", "raster", "raster-dem", "image", or "video".

Link copied to clipboard
abstract var url: String?

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

Link copied to clipboard
abstract var volatile: Boolean?

A setting to determine whether a source's tiles are cached locally. Defaults to false.