UNPKG

s2maps-gpu

Version:

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

21 lines (20 loc) 748 B
import type { MapOptions as MaplibreMapOptions } from 'maplibre-gl'; import type { MapOptions } from 's2/index.js'; /** * Convert Maplibre `MapOptions` to S2 {@link MapOptions} * * ex. * ```ts * import { convertMaplibreOptions } from 's2maps-gpu/plugins'; * import type { MapOptions as MaplibreMapOptions } from 'maplibre-gl'; * // setup maplibre options * const maplibreOptions: MaplibreMapOptions = { ... }; * // convert to s2maps options * const s2mapsOptions = convertMaplibreOptions(maplibreOptions); * // create a map with it * const map = new S2Map(s2mapsOptions); * ``` * @param input - the Maplibre options * @returns the S2 options */ export declare function convertMaplibreOptions(input: MaplibreMapOptions): MapOptions;