LayerApi <P, LayerDataTransferObject>
Index
Constructors
publicconstructor
Type parameters
- P: MergableObjectProps & MergableObjectOperations<P, P>
- LayerDataTransferObject
Parameters
_api: BimApi
API instance to use
layerFormat: string
Type of layer. For example “sensor”
_serialize: Serialize<LayerDataTransferObject, P, LayerInterface<P>>
Methods to convert between layer objects (implements MergableObject) and their DTO’s (data transferable object). DTO’s are what is actually stored in the layers (think of it as serialized layer objects).
Returns LayerApi<P, LayerDataTransferObject>
Properties
publicreadonlylayerFormat
Type of layer. For example “sensor”
Methods
publicgetOrLoadLayer
Get a layer for a specified change
Type parameters
- Change: LayerCompatibleChange
Parameters
change: Change
Change to get layer for.
Returns Promise<LayerFailure | Layer<Change, P, LayerDataTransferObject>>
Either the Layer or a LayerFailure. Use isFailure to check if the return value is a fLayerFailure or a Layer.
publicunload
Unloads layer of type layerFormat from specified change
Parameters
change: string | Pick<LayerCompatibleChange, id>
Change to unload layer for.
Returns boolean
true
if layer was unloaded.false
if layer did not exist in LayerApi.
Manages a set of layers (Layer) of a specified format. Layers can be added and unloaded.