Set Layer Visible

Toggles the visibility of target layer.

Syntax

store.dispatch({ type: "SET_LAYER_VISIBLE", payload: {id, visible} });

Parameters

id

The target layer to toggle visibility of.

Examples

Toggles layer 1 to be invisible.

store.dispatch({
  type: "SET_LAYER_VISIBLE",
  payload: {id: 1, visible: false}
});