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.
NameTypeSummaryClass
String

The name of the class.

more details
more detailsAccessor
ElevationSampler

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

more details
more detailsGroundView
Collection<LayerView>

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

more details
more detailsGroundView
Boolean

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

more details
more detailsGroundView

Property Details

declaredClassStringreadonly inherited
Since: ArcGIS API for JavaScript 4.7

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

elevationSamplerElevationSamplerreadonly

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:
var elevationSampler = view.groundView.elevationSampler;
// watch for changes in the elevationSampler
elevationSampler.on('changed', function() {
  // get z-values from the elevation displayed in the view
  var zEnrichedGeometry = elevationSampler.queryElevation(geometry);
});
layerViewsCollection<LayerView>readonly

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

See also:
updatingBooleanreadonly

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

Default Value:false

API Reference search results

NameTypeModule
Loading...