s2maps-gpu - v0.18.0
    Preparing search index...

    Function convertMaplibreStyle

    • 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 style
      const maplibreStyle: StyleSpecification = { ... };
      // convert to s2maps style
      const s2mapsStyle = convertMaplibreStyle(maplibreStyle);
      // create a map with it
      const map = new S2Map({ ..., style: s2mapsStyle });

      Parameters

      • input: StyleSpecification

        the MapLibre style

      Returns StyleDefinition

      the s2maps style