holeOnTerrain

The holeOnTerrain object enables creation of a hole on terrain that cuts holes in the terrain based on a polygon. The following member and method are available:

§  items

§  create()

items

static items : Array<TerraExplorerObject>

Returns an array of TerraExplorerObject containing all hole on terrain objects in the project.

 

create

create(description, polygon, options) → {promise}

Creates a hole on terrain object that removes the terrain texture while maintaining the original contours of the terrain.

Parameters

Name

Type

Description

description

String

The name of the hole on terrain object as it appears in the Layers and Objects section of the Analysis tab on the sidebar.

polygon

Array of Cesium.Cartesian3

Array which represents the hole on terrain polygon.

options

Object

Reserved. Currently not used.

Returns

Promise - A promise that resolves to the newly created hole on terrain TerraExplorerObject object.

Example

The following example creates a holeOnTerrain:

var pos1 = Cesium.Cartesian3.fromDegrees(-122.50984, 37.82545);

var pos2 = Cesium.Cartesian3.fromDegrees(-122.50458, 37.82845);

var pos3 = Cesium.Cartesian3.fromDegrees(-122.50182, 37.82574);

var pos4 = Cesium.Cartesian3.fromDegrees(-122.50678, 37.82262);

var cart = [pos1, pos2, pos3, pos4];

Cesium.when(TerraExplorer.objects.holeOnTerrain.create("Hole On Terrain", cart, {}), function(teObj){

teObj.flyTo();

});