Measure toolbar expanded.
Measure is a widget that allows users to make ephemeral measurements by clicking on the globe surface and on Cesium3DTiles and glTF models.
Measurement types include:
- Area: Computes the area of an arbitrary polygon. Note that the polygon area does not take into account the contours of terrain.
- Distance: Computes a linear distance between two points. Note that measurements on the earth do not conform to terrain.
- Component Distance: Computes a linear distance between two points, with horizontal and vertical components and the angle of the line. Note that measurements on the earth do not conform to terrain.
- Height: Computes a linear distance between a point in space and the terrain below that point. This value will always be 0 if activated in 2D mode.
- Horizontal: Computes a linear distance between two points at the same height relative to the the WGS84 Ellipsoid.
- Point: Displays the longitude and latitude coordinates and the height above terrain at a specified point in space.
- Vertical: Computes a linear distance between two points with the same longitude/latitude but different heights. This value will always be 0 if activated in 2D mode.
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
An object with the following properties
|
Example:
// In HTML head, include a link to the Measure.css stylesheet,
// and in the body, include: <div id="measureContainer"></div>
// Note: This code assumes you already have a Scene instance.
var measureWidget = new IonSdkMeasurements.Measure({
container : 'measureContainer',
scene : scene,
units : new IonSdkMeasurements.MeasureUnits({
distanceUnits : IonSdkMeasurements.DistanceUnits.METERS,
areaUnits : IonSdkMeasurements.AreaUnits.SQUARE_METERS,
volumeUnits : IonSdkMeasurements.VolumeUnits.CUBIC_FEET,
angleUnits : IonSdkMeasurements.AngleUnits.DEGREES,
slopeUnits : IonSdkMeasurements.AngleUnits.GRADE
})
});
Demo:
See:
Members
Gets the parent container.
readonly tilesetMeasurementSupported : Boolean
packages/ion-sdk-measurements/Source/Measure/Measure.js 179
Gets whether drawing a measurement on a Cesium3DTileset or Model is supported
readonly viewModel : MeasureViewModel
packages/ion-sdk-measurements/Source/Measure/Measure.js 166
Gets the view model.
Methods
Destroys the widget. Should be called if permanently
removing the widget from layout.
Returns:
true if the object has been destroyed, false otherwise.