SDK JS
    Preparing search index...

    Interface LayerSettingsWidgetOptions

    Configuration for LayerSettingsWidget. Every field is optional except that you must give it something to drive — layer, or layers for a picker across several.

    interface LayerSettingsWidgetOptions {
        defaultCollapsed?: boolean;
        initial?: Partial<Record<LayerSectionId, Record<string, unknown>>>;
        labels?: (l: object) => string;
        layer?: object;
        layers?: readonly object[];
        onChange?: (change: LayerSettingChange) => void;
        pollMs?: number;
        sections?: readonly (LayerSectionId | LayerSection)[];
        showAdvanced?: boolean;
    }
    Index

    Properties

    defaultCollapsed?: boolean

    Start collapsed to the round ⚙ button. Default false.

    initial?: Partial<Record<LayerSectionId, Record<string, unknown>>>

    Seed control values, per section. No layer reports its applied settings back today, so the widget OWNS this state and starts from documented defaults — pass what you constructed the layer with, or the panel will disagree with the scene until each control is touched.

    labels?: (l: object) => string

    Display name for a layer. Defaults to its id, then its constructor name.

    Type Declaration

      • (l: object): string
      • Parameters

        • l: object

          The layer to name.

        Returns string

        The label to show in the header and the picker.

    layer?: object

    The single layer to open.

    layers?: readonly object[]

    Several layers, with a picker in the header. The first is opened.

    onChange?: (change: LayerSettingChange) => void

    Called on every change, before the DOM event.

    Type Declaration

    pollMs?: number

    How often to re-probe for sections whose DATA has not arrived yet, in ms. Default 500. 0 disables the poll — call LayerSettingsWidget.refresh yourself.

    sections?: readonly (LayerSectionId | LayerSection)[]

    Restrict and/or reorder the sections. Pass ids for the built-ins, or your own LayerSection objects. Default: every built-in section, in registry order.

    showAdvanced?: boolean

    Render the collapsed "Advanced" group. Default true.