import BuildingGroupSublayer from "@arcgis/core/layers/buildingSublayers/BuildingGroupSublayer.js";const BuildingGroupSublayer = await $arcgis.import("@arcgis/core/layers/buildingSublayers/BuildingGroupSublayer.js");- Inheritance:
- BuildingGroupSublayer→
BuildingSublayer→ Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.10
Hierarchical group of BuildingSceneLayer sublayers. It is used to group BuildingComponentSublayers into disciplines. If a BuildingSceneLayer has a Full Model sublayer, then this is also represented as a BuildingGroupSublayer.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
id
- Type
- number
The sublayer's layer id as defined by the Scene Service.
- Default value
- -1
isEmpty
Indicates if this sublayer is empty. This property is only read from the service. Empty sublayers are not loaded for rendering and applications can choose to hide them in their UI.
listMode
- Type
- "hide" | "show" | "hide-children"
- Since
- ArcGIS Maps SDK for JavaScript 4.11
Indicates how the sublayer should display in the LayerList widget. The possible values are listed below.
| Value | Description |
|---|---|
| show | The sublayer is visible in the table of contents. |
| hide | The sublayer is hidden in the table of contents. |
| hide-children | Hide the children layers from the table of contents. |
- Default value
- "show"
modelName
The modelName is a standard name for each sublayer. For example the sublayer containing the doors in a building has the modelName "Doors". Use this property to retrieve sublayers in a BuildingSceneLayer.
Example
// use modelName to identify a sublayerconst doorslayer = buildingSceneLayer.allSublayers.find(function(sublayer) { return sublayer.modelName === "Doors";}); opacity
- Type
- number
Opacity of the sublayer.
- Default value
- 1
uid
- Type
- string
- Since
- ArcGIS Maps SDK for JavaScript 4.33
An automatically generated unique identifier assigned to the instance. The unique id is generated each time the application is loaded.
visible
- Type
- boolean
Indicates if the sublayer is visible in the view. Can be used to toggle the visibility of all nested sublayers.
Methods
| Method | Signature | Class |
|---|---|---|
loadAll(): Promise<this> | |
loadAll
- Signature
-
loadAll (): Promise<this>
- Since
- ArcGIS Maps SDK for JavaScript 4.11
Loads all contained sublayers.
- See also
Example
// Load all contained sublayers but ignore if one or more of them failed to loadbuildingGroupSublayer.loadAll() .catch(function(error) { // Ignore any failed resources }) .then(function() { console.log("All loaded"); });