Example:
const tileset = await Cesium.Cesium3DTileset.fromUrl(url);
// Layers from the root tileset exist once fromUrl resolves.
tileset.featureLayers.getByName("Roads")[0].show = false;
// Layers discovered later are added as they load.
tileset.featureLayers.layerAdded.addEventListener((layer) => {
layer.show = layer.name !== "Vegetation";
});
Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
Members
layerAdded : Event.<function(FeatureLayer): void>
Raised synchronously when a layer is added, before any of its features are rendered.
The number of layers.
Methods
Checks whether this collection contains the given layer.
| Name | Type | Description |
|---|---|---|
layer |
FeatureLayer | optional The layer to check for. |
Returns:
true if the collection contains the layer, false otherwise.
Gets the layer at the given index.
| Name | Type | Description |
|---|---|---|
index |
number | The index. |
Returns:
The layer.
getByName(name) → Array.<FeatureLayer>
Gets all layers with the given name. Names are not required to be unique.
| Name | Type | Description |
|---|---|---|
name |
string | The layer name. |
Returns:
The matching layers.
