Readonly
hasRead-only flag to check if a given object is of type HasLayers.
Returns the number of layers currently in this object.
Applies the callback to each layer in the object.
Returns a new array containing the layers in this object. Optionally, the predicate can be used to filter out unwanted layers.
// Get all layers from the object.
const allLayers = obj.getLayers();
// Get all color layers from the object.
const colorLayers = obj.getLayers((layer) => layer.isColorLayer);
Optional
predicate: ((arg0: Layer<LayerEvents, LayerUserData>) => boolean)
Interface for any object that can contain Layer.