GroundView

AMD: require(["esri/views/GroundView"], (GroundView) => { /* code goes here */ });
ESM: import GroundView from "@arcgis/core/views/GroundView";
Class: esri/views/GroundView
Inheritance: GroundView Accessor
Since: ArcGIS API 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 layers in the ground. An instance of this class can be accessed through SceneView.groundView.

See also:

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
Show inherited properties Hide inherited properties
Name Type Summary Class
Stringmore details

The name of the class.

more detailsAccessor
ElevationSamplermore details

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

more detailsGroundView
Collection<LayerView>more details

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

more detailsGroundView
Booleanmore details

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

more detailsGroundView

Property Details

declaredClass Stringreadonly inherited

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

elevationSampler ElevationSamplerreadonly

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 demResolution property of the returned sampler will always return `{ min: -1, max: -1 }.

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

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);
});
layerViews Collection<LayerView>readonly

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

See also:
updating Booleanreadonly

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

Default Value:false

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