LegendLayer.id¶
Summary¶
LegendLayer.id is the unique identifier OverlaySystem uses to track the legend layer instance. This ID is required for removeLayer(id) workflows.
Syntax¶
Parameters¶
This property does not take parameters.
Returns¶
string - Layer identifier.
Type Details¶
Example¶
const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);
const layer = wgpu.createOverlay.legend({
id: "legend-main",
source: { scaleTransform: { mode: "linear", domainMin: 0, domainMax: 1 }, colormap: "viridis" }
});
console.log(layer.id);