SDK JS
    Preparing search index...
    • Build a billboard atlas of text labels, one cell per UNIQUE label string. Browser-only (Canvas 2D).

      Parameters

      • labels: readonly string[]

        The label strings to rasterise (duplicates are deduped to one cell).

      • style: TextLabelStyle = {}

        Text style (TextLabelStyle); each field falls back to a sensible default.

      Returns { atlas: BillboardSpriteAtlas; indexOf: Map<string, number> }

      { atlas, indexOf } — the BillboardSpriteAtlas to feed a billboard renderer, and a label → cell index map so a caller can set each point's symbolId.

      const { atlas, indexOf } = makeTextLabelAtlas(['Oak', 'Birch', 'Pine']);
      map.addLayer(new BillboardInstancesLayer({
      id: 'species', atlas,
      instances: trees.map((t) => ({ position: t.pos, symbolId: indexOf.get(t.species)! })),
      }));