vectorTilesetSource
You can use vectorTilesetSource to build layers and widgets using pre-generated CARTO tilesets stored in your data warehouse that contain:
Vector data:
points,
lines,
polygons
etc...
Usage
import {vectorTilesetSource} from '@carto/api-client';
const data = vectorTilesetSource({
accessToken: 'XXX',
connectionName: 'carto_dw',
tableName: 'carto-demo-data.demo_tilesets.sample_tileset'
});
Options
type VectorTableSourceOptions = {
tableName: string;
widgetWorker?: boolean;
};
tableName: The fully qualified name (FQN) of the tileset you want to retrieve from your data warehouse. For example, for a BigQuery connection,
carto-demo-data.demo_tables.sample_tileset
would be a valid table name.widgetWorker (optional): A boolean that enables or disables the use of Web Workers to perform clent-side calculations for widgets.
Response
The response of vectorTilesetSource
is a promise that can be resolved and used in layers and widgets.
Connection compatibility
Layer compatibility
vectorTableSource
is compatible with the following layers from the @deck.gl/carto
module:
Widget model compatibility
vectorTableSource
is compatible with the following widget models:
Widget models for tilesets are calculated client side. Precision might be lower, especially at low zoom levels (ie: when covering a large surface of the earth). Learn more about client-side widget calculations.
Last updated
Was this helpful?