@kepler.gl/constants
Version:
kepler.gl constants used by kepler.gl components, actions and reducers
67 lines (66 loc) • 1.96 kB
TypeScript
export declare enum DatasetType {
LOCAL = "local",
VECTOR_TILE = "vector-tile",
RASTER_TILE = "raster-tile",
WMS_TILE = "wms-tile"
}
export declare enum RemoteTileFormat {
MVT = "mvt",
PMTILES = "pmtiles",
WMS = "wms"
}
export declare enum PMTilesType {
RASTER = "raster",
MVT = "mvt"
}
export declare const REMOTE_TILE = "remote";
export declare type VectorTileDatasetMetadata = {
type: typeof REMOTE_TILE;
remoteTileFormat: RemoteTileFormat;
tilesetDataUrl: string;
tilesetMetadataUrl?: string;
};
/**
* Raster tileset metadata in STAC Item format. STAC version must be >= 1.0.0,
* and the EO and Raster STAC extensions are required. This metadata shape can
* be passed to the map to synchronously add a raster tileset.
* @see https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md
*/
export declare type RasterTileLocalMetadata = {
type: 'Feature';
/** URL for tileset metadata. */
metadataUrl?: string;
stac_version: string;
stac_extensions: string[];
assets: Record<string, any>;
};
/**
* Raster tileset metadata with a remote metadata URL. This metadata can
* be passed to the map to asynchronously load a raster tileset.
*/
export declare type RasterTileRemoteMetadata = {
metadataUrl: string;
};
export declare enum RasterTileType {
STAC = "stac",
PMTILES = "pmtiles"
}
export declare type RasterTileMetadataSourceType = {
pmtilesType?: PMTilesType;
};
/**
* Raster tileset metadata.
*/
export declare type RasterTileDatasetMetadata = (RasterTileLocalMetadata | RasterTileRemoteMetadata) & RasterTileMetadataSourceType;
export declare type WMSDatasetMetadata = {
type: typeof REMOTE_TILE;
remoteTileFormat: RemoteTileFormat.WMS;
tilesetDataUrl: string;
tilesetMetadataUrl: string;
version: string;
layers: {
name: string;
title: string;
boundingBox: number[] | null;
}[];
};