Provide terrain slices through STK terrain service or SuperMap iServer REST API.
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Objects containing the following properties:
|
Example:
var terrainProvider = new Cesium.CesiumTerrainProvider({
url : ‘http://localhost:8090/Terrain’,
requestWaterMask : true,
requestVertexNormals : true,
isSct : true
});
var viewer = new Cesium.Viewer(‘cesiumContainer’,{
terrainProvider : terrainProvider
});
Members
-
credit : Credit
-
Get the description information of the terrain service.
-
Get or set the version of terrain data currently in use. Currently only tin terrain data is supported.
-
Get or set a custom request header.
-
Get whether the current terrain has vertex normals. Cannot be called before
CesiumTerrainProvider#ready
returns TRUE. -
Whether there is a water surface mark.
-
Get all historical version information of terrain data. Currently only tin terrain data is supported.
-
Get or set whether the indexedDB cache of the terrain is enabled (IE browser does not support).
Example:
//Set whether to save the terrain cache to the indexedDB database of the browser viewer.terrainProvider.indexedDBSetting.isOpen = true
-
Get whether the terrain service is ready.
-
Get the ready state promise object of the terrain service.
-
Whether to request vertex normals.
-
Whether to request the water surface flag.
-
Get or set the subdomain name. Through this interface, you can request data from the specified subdomain.
-
tilingScheme : GeographicTilingScheme
-
Get the projection object (latitude and longitude or Mercator projection) of the terrain service.
-
Get or set whether the terrain is visible. Using this interface, you can set the display and hide of the terrain without refreshing the earth. You need to set invisibility to true when creating CesiumTerrainProvider.
Methods
-
Get the maximum geometric error of the level.
Name Type Description level
Number The level of tile Returns:
Maximum geometric error. -
Get whether the tile data corresponding to x y level is available.Get whether the tile data corresponding to x y level is available.
Name Type Description x
Number x coordinate. y
Number y coordinate. level
Number The level of tile Returns:
it's usable or not.