s2maps-gpu
Version:
S2 Maps GPU - An open source, high-performance, and GPU-accelerated map engine for rendering large-scale, interactive maps.
11 lines (10 loc) • 777 B
TypeScript
import type { JSONCollection, MValue, Projection, Properties, VectorFeatures, VectorGeometry } from '../index.js';
/**
* Convert a GeoJSON Feature to a GeoJSON Vector Feature in either a WebMercator or S2 projection
* @param projection - output either S2 or WM
* @param data - the data to convert
* @param buildBBox - optional - build a bbox for the feature if desired
* @param toUnitScale - optional - convert to unit scale. Assumed to be true if not specified
* @returns - the converted data
*/
export declare function convert<M = Record<string, unknown>, D extends MValue = Properties, P extends Properties = Properties>(projection: Projection, data: JSONCollection<M, D, P>, buildBBox?: boolean, toUnitScale?: boolean): VectorFeatures<M, D, P, VectorGeometry<D>>[];