FIMViz.jsAPI
    Preparing search index...

    Function bindLegend

    • Mount a legend that keeps itself current.

      const legend = bindLegend(layer, { root: document.querySelector('#legend') });
      layer.set({ palette: 'viridis' }); // the panel repaints itself

      Parameters

      • layer: Layer
      • Optionalopts: { empty?: string; html?: boolean; render?: Function; root?: Element } = {}

        render overrides renderLegend — take the Legend, return an HTML string.

      Returns { destroy: () => void; el: Element; off: () => void; update: () => void }