← Back to LayerTree domain

LayerTree.makeSnapshot

Returns the layer snapshot identifier.

Domain: LayerTree experimental

Parameters

NameTypeDescription
layerIdLayerIdThe id of the layer.

Returns

NameTypeDescription
snapshotIdSnapshotIdThe id of the layer snapshot.

Example Request

{
  "id": 1,
  "method": "LayerTree.makeSnapshot",
  "params": {
    "layerId": "layerId-value"
  }
}

Example Response

{
  "id": 1,
  "result": {
    "snapshotId": "snapshotId-value"
  }
}

Usage in Node.js

const result = await send('LayerTree.makeSnapshot', {"layerId": "layerId-value"});
console.log(result);
// {"snapshotId": "snapshotId-value"}