On this page

Type Alias VectorSourceSpecification

type VectorSourceSpecification = {
    attribution?: string;
    bounds?: [number, number, number, number];
    encoding?: "mvt" | "mlt";
    maxzoom?: number;
    minzoom?: number;
    promoteId?: PromoteIdSpecification;
    scheme?: "xyz" | "tms";
    tiles?: string[];
    type: "vector";
    url?: string;
    volatile?: boolean;
}
Index

Properties

attribution?: string

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

bounds?: [number, number, number, number]

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]. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre.

[-180, -85.051129, 180, 85.051129]
encoding?: "mvt" | "mlt"

The encoding used by this source. Mapbox Vector Tiles encoding is used by default.

"mvt"
maxzoom?: number

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

22
minzoom?: number

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

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

scheme?: "xyz" | "tms"

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

"xyz"
tiles?: string[]

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

type: "vector"

The type of the source.

url?: string

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

volatile?: boolean

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

Was this helpful?
SDK JS
Reference
VectorSourceSpecification