This sample shows how to use the measurement components in 3D:
The straight distance between two points can be measured using the Direct Line Measurement 3D component. The component displays the horizontal, vertical and direct distance.

An area can be measured using the Area Measurement 3D component.

The measurement components can also be used with all types of layers, including PointCloudLayer or IntegratedMeshLayer.
By default, snapping is enabled to all layers that support snapping (feature layer, graphics layer, GeoJSON layer, WFS layer, CSV layer, 3D object scene layer, and building scene layer). This can be temporarily disabled by holding the CTRL
key.
When the component is active, a horizontal "laser" line is drawn which indicates the height at the current mouse position. This line can help in analyzing the heights of objects relative to each other and the terrain.