UNPKG

s2maps-gpu

Version:

S2 Maps GPU - An open source, high-performance, and GPU-accelerated map engine for rendering large-scale, interactive maps.

28 lines (27 loc) 910 B
import Source from './source.js'; import { TileStore } from 'gis-tools/index.js'; import { WMPointCluster } from './pointCluster/index.js'; import type { SourceMetadata } from 'style/style.spec.js'; import type { TileRequest } from '../worker.spec.js'; /** * # JSON Source * * ## Description * A source that is a json file that contains geojson or s2json data. * * The json can be stored as a tile store or a point cluster. */ export default class JSONSource extends Source { json: TileStore | WMPointCluster; /** * @param mapID - the id of the map to build for * @param metadata - the metadata for the source */ build(mapID: string, metadata?: SourceMetadata): Promise<void>; /** * Fetch a tile * @param mapID - the id of the map requesting data * @param tile - the tile request */ _tileRequest(mapID: string, tile: TileRequest): Promise<void>; }