Convert a MapLibre style to an s2maps StyleDefinition
ex.
import { convertMaplibreStyle } from 's2maps-gpu/plugins';import type { StyleSpecification } from '@maplibre/maplibre-gl-style-spec';// setup maplibre styleconst maplibreStyle: StyleSpecification = { ... };// convert to s2maps styleconst s2mapsStyle = convertMaplibreStyle(maplibreStyle);// create a map with itconst map = new S2Map({ ..., style: s2mapsStyle }); Copy
import { convertMaplibreStyle } from 's2maps-gpu/plugins';import type { StyleSpecification } from '@maplibre/maplibre-gl-style-spec';// setup maplibre styleconst maplibreStyle: StyleSpecification = { ... };// convert to s2maps styleconst s2mapsStyle = convertMaplibreStyle(maplibreStyle);// create a map with itconst map = new S2Map({ ..., style: s2mapsStyle });
the MapLibre style
the s2maps style
Convert a MapLibre style to an s2maps StyleDefinition
ex.