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) 785 B
import type { StyleDefinition } from 'style/style.spec.js'; import type { StyleSpecification } from '@maplibre/maplibre-gl-style-spec'; /** * Convert a MapLibre style to an s2maps {@link StyleDefinition} * * ex. * ```ts * import { convertMaplibreStyle } from 's2maps-gpu/plugins'; * import type { StyleSpecification } from '@maplibre/maplibre-gl-style-spec'; * // setup maplibre style * const maplibreStyle: StyleSpecification = { ... }; * // convert to s2maps style * const s2mapsStyle = convertMaplibreStyle(maplibreStyle); * // create a map with it * const map = new S2Map({ ..., style: s2mapsStyle }); * ``` * @param input - the MapLibre style * @returns the s2maps style */ export declare function convertMaplibreStyle(input: StyleSpecification): StyleDefinition;