FeatureLayerCollection

The feature layers of a Cesium3DTileset or a FeatureLayerProvider. Read-only: layers come from the provider's data.

A tileset's layers are currently created from the root tileset JSON's 3D Tiles 1.1 groups, and exist once Cesium3DTileset.fromUrl resolves. Groups in external tilesets are not yet supported.

internal constructor new Cesium.FeatureLayerCollection()

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

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.
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.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.