Skip to main content

LayerApi <P, LayerDataTransferObject>

Manages a set of layers (Layer) of a specified format. Layers can be added and unloaded.

Index

Constructors

Properties

Methods

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

layerFormat: string

Type of layer. For example “sensor”

Methods

publicgetOrLoadLayer

  • getOrLoadLayer<Change>(change: Change): Promise<LayerFailure | Layer<Change, P, LayerDataTransferObject>>

publicunload

  • Unloads layer of type layerFormat from specified change


    Parameters

    Returns boolean

    true if layer was unloaded. false if layer did not exist in LayerApi.