@versatiles/style
    Preparing search index...

    Function guessStyle

    Everything both entry points expose. index.ts (npm) adds the authoring helpers on top; browser.ts (the CDN bundle) does not — see the note in each.

    • Inspect a tileset and return the most appropriate MapLibre style.

      source is either the URL of a TileJSON document, which is downloaded (relative tiles are resolved against the document), or a TileJSON object the caller already holds — a tile server has one in memory from its container's metadata — which is used without any network access (relative tiles are resolved against options.urls.base). The caller's object is not modified.

      Styles by tileset:

      • Shortbread vector tiles → full osm() style
      • OpenMapTiles or Protomaps vector tiles, with that schema injected (options.schemas) → its style
      • Vector tiles matching a caller's own injected schema → that schema's style
      • Unknown vector tiles → inspector style (one color-coded fill+line+label per source-layer)
      • Raster tiles with satellite name hint → satellite() style
      • Other raster tiles → minimal single-layer raster style

      Never throws — an invalid argument, a failed download or a malformed document all yield a blank (but valid) StyleSpecification.

      Parameters

      Returns Promise<StyleSpecification>