Upgrade your experience with TerraExplorer Fusion, our new and powerful web-based 3D geospatial viewer. TerraExplorer Fusion offers many advantages over TerraExplorer for Web including: faster application loading times, improved rendering of large-scale layers, and full compatibility with TerraExplorer Desktop layer styling, objects, and API. Learn more > |
The tool/application’s JavaScript can include any of the following:
- Access to any of the TE4W API objects
- Access to Cesium API
- Implementation of any script API (e.g., JavaScript)
Using TerraExplorer for Web API
TerraExplorer for Web (TE4W) API provides TerraExplorer objects that extend the Cesium API with custom methods for the loading and accessing of layers, navigating, drawing geometry objects, creating advanced terrain objects, performing analysis, and more. The TerraExplorer object is the entry point to most TerraExplorer for Web API functionalities. Through this object you can manage your project content, navigate, create different objects, and perform analysis.
The objects listed below are the members of the TerraExplorer object:
- navigate – Navigate in the 3D World by activating the fly around tool and setting navigation mode and underground flight and create locations.
- objects – Create advanced terrain objects.
- layers – Load different layer types into your project.
- analysis – Analyze the terrain.
- project – Access all the project’s layers and objects.
- window – Access the application's 3D Window.
- drawing – Draw points, polylines and polygons.
- settings – Access to a range of visual display settings.
The TE4W API also includes an additional object:
- TerraExplorerObject - Gives access to the objects returned when any layer or object is created or loaded into the project.
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
The following example combines both methods of accessing the Cesium API described above:
viewer.camera.flyTo({destination : Cesium.Cartesian3.fromDegrees(-117.16, 32.71, 15000.0) });