mesh

The mesh object enables you to load mesh layers into the project and provides access to all loaded layers. The following member and method are available:

§   items

§   create()

items

static items : Array<TerraExplorerObject>

Returns an array of TerraExplorerObject containing all the mesh layers in the project.

create

create(description, url, layer, options) → {promise}

Loads a mesh layer into the project.

Parameters

Name

Type

Description

description

String

The name of the layer as it appears in the Layers tab of the TE4W sidebar.

url

String

The URL of the SkylineGlobe Server (SGS) from which the layer is loaded, e.g., http://www.skylineglobe.com/SG.

layer

String

The ID or alias of the layer in the SkylineGlobe Server. You can obtain the layer ID by looking it up in the SGS Manager.

options

Object

Reserved. Currently not used.

Returns

Promise - A promise that resolves to the newly created mesh layer TerraExplorerObject object when loaded or an error string if the URL failed to load.

 

Example

The following example creates a mesh layer. For more information, see an online interactive tutorial with code editor.

 

// JavaScript source code

//Load a mesh layer using the mesh.create method.

Cesium.when(

                                 TerraExplorer.layers.mesh.create(

                                   "Auburn","https://www.SkylineGlobe.com/SG", "sg3dml_auburn"),

                                 function(meshLayer) {

                                   Cesium.when(meshLayer.readyPromise, function() {

                                     meshLayer.flyTo(); //flies to Mesh Layer

                                   });

                                 }

                               );