GeoLeaf Core API - v3.19.0
    Preparing search index...

    Control helpers added to the Labels singleton.

    Kept apart from LabelsReadApi because these are not reads: they act on the DOM. Merging them would have made the read interface's name a lie.

    interface LabelsControlApi {
        syncLayerControl(layerId: string): void;
    }
    Index
    • Repaints the label toggle of one layer's row in the layer manager.

      The rest of this facade drives the label STATE; this drives the CONTROL that displays it. The two part company whenever a host changes a layer's visibility or style through its own path instead of through this facade: the state is right, the button still shows what was true before. Calling this puts the button back in agreement with the layer.

      Idempotent, synchronous, and a no-op on an empty id or a layer with no row on screen. LabelsApi.refreshLabels is not a substitute — it re-renders the labels themselves, never the toggle.

      Parameters

      • layerId: string

        Layer whose control is repainted.

      Returns void

      // The host switched a layer off through its own UI; put the toggle back in
      // agreement with it.
      GeoLeaf?.Labels?.syncLayerControl("poi-restaurants");