Skip to content
import GroundView from "@arcgis/core/views/GroundView.js";
Inheritance:
GroundViewAccessor
Since
ArcGIS Maps SDK for JavaScript 4.7

This class represents the view for the Ground of a map. It can be used to sample elevation from the terrain surface that is currently visible in the view or to access the LayerViews of the Ground.layers in the ground. An instance of this class can be accessed through SceneView.groundView.

See also

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
PropertyTypeClass
declaredClass
readonly inherited
elevationSampler
readonly
extent
readonly
layerViews
readonly
updating
readonly

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

elevationSampler

readonly Property
Type
ElevationSampler | null

An elevation sampler that may be used to sample and query elevation values from the ground surface that is currently being displayed.

The elevation sampler is not supported for MapView and may be null while the ground surface display is being initialized.

The resolution of the sampled values depends on the ground elevation display resolution (high resolution close to the camera, low resolution far away from the camera). Because of the dynamic nature of the display resolution, the ElevationSampler.demResolution property of the returned sampler is not fixed and will change based on the data loaded by the view.

If higher or more consistent sample resolution is required, then consider creating a sampler at the desired resolution using ElevationLayer.createElevationSampler() or Ground.createElevationSampler().

Example
let elevationSampler = view.groundView.elevationSampler;
// watch for changes in the elevationSampler
elevationSampler.on('changed', function() {
// get z-values from the elevation displayed in the view
let zEnrichedGeometry = elevationSampler.queryElevation(geometry);
});

extent

readonly Property
Type
Extent | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.28

The extent represents the visible portion of ground within the view as an instance of Extent. The ground view extent is computed based on the ground surface elevation at the center of the view, while the SceneView extent is computed at the elevation of all of the scene content at the center of the view. The ground view extent may be more appropriate when synchronizing the viewpoint of a MapView and a SceneView.

layerViews

readonly Property
Type
Collection<LayerView>

A collection containing a hierarchical list of all the created LayerViews of the Ground.layers in the ground.

See also

updating

readonly Property
Type
boolean

Value is true when any of the ground layer views are updating.

Default value
false