VoxelLayer with discrete variable

This sample shows how to visualize and change the properties of a discrete variable using uniqueValues on a VoxelLayer.

If the variable of the voxel layer contains qualitative data, for example, the soil types defined in discrete classes, the data is visualized using uniqueValues. The uniqueValues describe how to render both discrete variable volumes and sections. Use the method getVariableStyle of VoxelLayer to get the selected variable's VoxelVariableStyle

1
2
3
4
5
const currentVariableStyle = vxlLayer.getVariableStyle(null);
const uniqueValue = currentVariableStyle.uniqueValues.getItemAt(i);
uniqueValue.color = new Color("#00FF00");
uniqueValue.enabled = true; //whether or not to render the data
uniqueValue.label = "Gravel";

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

The developer dashboard has moved

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close