A TerrainProvider that access terrain data in a Cesium terrain format.
The format is described on the
wiki.
alias CesiumTerrainProvider
{Object} options Object with the following properties:
{String} options.url The URL of the Cesium terrain server.
{Proxy} [options.proxy] A proxy to use for requests. This object is expected to have a getURL function which returns the proxied URL, if needed.
{Boolean} [options.requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server, in the form of per vertex normals if available.
{Boolean} [options.requestWaterMask=false] Flag that indicates if the client should request per tile water masks from the server, if available.
{Ellipsoid} [options.ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
{Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas.
// Construct a terrain provider that uses per vertex normals for lighting
// to add shading detail to an imagery provider.
var terrainProvider = new Cesium.CesiumTerrainProvider({
url : 'https://assets.agi.com/stk-terrain/world',
requestVertexNormals : true
});
// Terrain geometry near the surface of the globe is difficult to view when using NaturalEarthII imagery,
// unless the TerrainProvider provides additional lighting information to shade the terrain (as shown above).
var imageryProvider = Cesium.createTileMapServiceImageryProvider({
url : 'http://localhost:8080/Source/Assets/Textures/NaturalEarthII',
fileExtension : 'jpg'
});
var viewer = new Cesium.Viewer('cesiumContainer', {
imageryProvider : imageryProvider,
baseLayerPicker : false,
terrainProvider : terrainProvider
});
// The globe must enable lighting to make use of the terrain's vertex normals
viewer.scene.globe.enableLighting = true;
A TerrainProvider that access terrain data in a Cesium terrain format. The format is described on the wiki.
alias CesiumTerrainProvider
// Construct a terrain provider that uses per vertex normals for lighting // to add shading detail to an imagery provider. var terrainProvider = new Cesium.CesiumTerrainProvider({ url : 'https://assets.agi.com/stk-terrain/world', requestVertexNormals : true }); // Terrain geometry near the surface of the globe is difficult to view when using NaturalEarthII imagery, // unless the TerrainProvider provides additional lighting information to shade the terrain (as shown above). var imageryProvider = Cesium.createTileMapServiceImageryProvider({ url : 'http://localhost:8080/Source/Assets/Textures/NaturalEarthII', fileExtension : 'jpg' }); var viewer = new Cesium.Viewer('cesiumContainer', { imageryProvider : imageryProvider, baseLayerPicker : false, terrainProvider : terrainProvider }); // The globe must enable lighting to make use of the terrain's vertex normals viewer.scene.globe.enableLighting = true;
TerrainProvider