SDK JS
    Preparing search index...

    What a section is handed when it builds.

    interface SectionContext {
        fam: LayerFamily;
        layer: object;
        map: Map$1;
        emit(key: string, value: unknown): void;
        onDispose(fn: () => void): void;
        onRefresh(fn: () => void): void;
        read<T>(key: string, fallback: T): T;
    }
    Index

    Properties

    The layer's family — for ranges and defaults only.

    layer: object

    The layer this section was built for.

    map: Map$1

    The map the widget is mounted on.

    Methods

    • Report a change; drives onChange + the layersettingschange DOM event.

      Parameters

      • key: string
      • value: unknown

      Returns void

    • Register teardown for anything the section attached OUTSIDE its own subtree.

      Parameters

      • fn: () => void

      Returns void

    • Register a re-read to run on every widget refresh (streamed counts, late-arriving data).

      Parameters

      • fn: () => void

      Returns void

    • Seed a control's initial value. Reads LayerSettingsWidgetOptions.initial[section][key], then the layer's own settings snapshot if it ever grows one, then fallback.

      Type Parameters

      • T

      Parameters

      • key: string
      • fallback: T

      Returns T

      No layer exposes its applied settings today (see the getSettings() prerequisite), so the widget OWNS this state: a layer mutated from elsewhere silently desyncs the panel.