---
title: "VectorSourceSpecification | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Type Alias VectorSourceSpecification

type VectorSourceSpecification \= {  
    [attribution](#attribution)?: string;  
    [bounds](#bounds)?: \[number, number, number, number\];  
    [encoding](#encoding)?: "mvt" | "mlt";  
    [maxzoom](#maxzoom)?: number;  
    [minzoom](#minzoom)?: number;  
    [promoteId](#promoteid)?: [PromoteIdSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/PromoteIdSpecification/);  
    [scheme](#scheme)?: "xyz" | "tms";  
    [tiles](#tiles)?: string\[\];  
    [type](#type): "vector";  
    [url](#url)?: string;  
    [volatile](#volatile)?: boolean;  
}

##### Index

### Properties[](#properties)

[attribution?](#attribution) [bounds?](#bounds) [encoding?](#encoding) [maxzoom?](#maxzoom) [minzoom?](#minzoom) [promoteId?](#promoteid) [scheme?](#scheme) [tiles?](#tiles) [type](#type) [url?](#url) [volatile?](#volatile)

## Properties[](#properties-1)

### `Optional`attribution[](#attribution)

attribution?: string

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

### `Optional`bounds[](#bounds)

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.

#### Default[](#default)

```json
[-180, -85.051129, 180, 85.051129]
```

### `Optional`encoding[](#encoding)

encoding?: "mvt" | "mlt"

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

#### Default[](#default-1)

```typescript
"mvt"
```

### `Optional`maxzoom[](#maxzoom)

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.

#### Default[](#default-2)

```typescript
22
```

### `Optional`minzoom[](#minzoom)

minzoom?: number

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

### `Optional`promoteId[](#promoteid)

promoteId?: [PromoteIdSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/PromoteIdSpecification/)

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.

### `Optional`scheme[](#scheme)

scheme?: "xyz" | "tms"

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

#### Default[](#default-3)

```typescript
"xyz"
```

### `Optional`tiles[](#tiles)

tiles?: string\[\]

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

### type[](#type)

type: "vector"

The type of the source.

### `Optional`url[](#url)

url?: string

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

### `Optional`volatile[](#volatile)

volatile?: boolean

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