VectorTileSource class

A vector tile source describes how to access a vector tile layer. Vector tile sources can be used with; SymbolLayer, LineLayer, PolygonLayer, BubbleLayer, HeatmapLayer and VectorTileLayer.

Extends

Constructors

VectorTileSource(string, VectorTileSourceOptions)

Methods

getId()

Gets the id of the data source

getOptions()

Gets the options of the VectorTileSource.

getShape(string, Expression)

Returns all GeoJSON features that are in the VectorTileSource and which satisfy the specified filter expression.

Constructor Details

VectorTileSource(string, VectorTileSourceOptions)

new VectorTileSource(id?: string, options?: VectorTileSourceOptions)

Parameters

id

string

Method Details

getId()

Gets the id of the data source

function getId()

Returns

string

getOptions()

Gets the options of the VectorTileSource.

function getOptions()

Returns

getShape(string, Expression)

Returns all GeoJSON features that are in the VectorTileSource and which satisfy the specified filter expression.

function getShape(sourceLayer: string, filter?: Expression)

Parameters

sourceLayer

string

Required if the source is a VectorTileSource. Specifies the layer within the VectorTileSource to query.

filter
Expression

A filter that will limit the query.

Returns

Array<Feature<Geometry, any>>