SuperMap supports generating 3D terrain cache for grid dataset to optimize the display of terrain data at the client side with tiles. SuperMap iClient3D for WebGL can access 3D services publishied by SuperMap iServer to load terrain data.
This document explains how WebGL Client load and browse terrain data.
Here is an example to illustrate the steps.
SuperMap iDesktop can generate 3D terrain cache .sct based on terrain data.
(1) Open SuperMap iDesktop, Workspace Manager>Datasource>Open File Datasource.
2 Select the terrain dataset to generate cache, right click to display the context menu, click Create Scene Cache.
3 In the dialog box that displays, as shown below:
4 In the dataset list are datasets to generate cache. You can click Add Dataset or Delete to manage datasets for generating cache. Following suggestions are provided for parameter settings.
5 For Parameter Settings, please follow the suggestions below:
6 Keep Cache Extent and Scales by default. Click OK to generate cache.
After generating cache, open the Terrain folder, you will see a file named info.sct, which is the configuration file for the terrain data cache. Folders named with numbers store cache data of different levels.
After creating cache, we will see how to publish the terrain cache as 3D services to allow WebGL Client to load terrain data.
1 Open SuperMap iDesktop, Workspace Manager>Scene>New Spherical Scene.
2 Layer Manager>Terrain Layers>Add Terrain Cache Layer, select the *.sct configuration file generated.
3 After adding terrain cache layer, save the scene and workspace.
4 Start iserver via 4 startup.bat under %SuperMap iServer_HOME%/bin.
5 Start bowser, enter Web Manager via http://localhost:8090/iserver/manager. Quickly publish a service at Home Page.
6 In the Quickly publish service--Select datasource page, select the Workspace as the Data source, and click Next.
7 In the Quickly publish service--Configure data page, click Remote Browse to select the workspace, click Next.
8 In the Quickly publish service--Select service type page,Select REST 3D Service, click Next.
When finished, click Finish and Close.
The service displays in the service list http://localhost:8090/iserver/services, as shown below.
After publishing service, WebGL Client can load the image data.
Please place WebGL package at %SuperMap iServer_HOME%/webapps.
1 Get the url of the 3D data.
2 Enter the path of WebGL product package in %SuperMap iServer_HOME%/webapps, in the examples folder, open S3MTiles.html with text editor, and modify the following content.
3 Open the terrainAndImagery.html page, that is, enter the url http://localhost:8090/%WebGL Package%/examples/terrainAndImagery.html in the browser.
After you open the page, the camera flies to the position of the terrain data, as shown below.
Note: For more information about how to load image data, please refer to Load Image Data.