Using Cesium API
You can access the Cesium API in either of the following ways:
§ Access the TE4W instantiated Cesium viewer object (of type Cesium.Viewer). See https://cesiumjs.org/Cesium/Build/Documentation/Viewer.html for more information.
§ Access the global Cesium object which exposes the entire Cesium API. For further information see the Cesium API documentation: https://cesiumjs.org/index.html, https://cesiumjs.org/refdoc/, https://cesiumjs.org/tutorials/Cesium-Workshop/
The following example combines both methods of accessing the Cesium API described above:
Note: Also see Example 3 – for an example of a tool script that accesses Cesium API to create a mesh layer (using mesh.create), then fly to it (using Cesium API) and then create a viewshed in that location (using viewshed.create).
viewer.camera.flyTo({destination : Cesium.Cartesian3.fromDegrees(-117.16, 32.71, 15000.0) });