- Author:
-
Examples:
// 官方地形
var terrainProvider = new Cesium.GeoCesiumTerrainProvider({
url: Cesium.IonResource.fromAssetId(1),
requestVertexNormals: true,
requestWaterMask: true
});
viewer.terrainProvider = terrainProvider;
// 360度金字塔切片方案地形
var terrainProvider = new Cesium.GeoCesiumTerrainProvider({
url: "http://" + Cfg.host + "/geomap-api/JsCesuimDemo/resource/data/terrain/",
requestVertexNormals: true,
});
viewer.terrainProvider = terrainProvider;
// 高斯投影坐标量化地形(无带号)
var tilingScheme = new Cesium.GeoProjectedTilingScheme({
viewer: viewer,
extent: [499988.31453309144, 4540539.362186298, 584163.6431428336, 4652136.257245313] //layer.json中读取
});
var terrainProvider = new Cesium.GeoCesiumTerrainProvider({
url: "/geomap-api/JsCesuimDemo/resource/data/gaussMeshTerrain/",
tilingScheme: tilingScheme
});
viewer.terrainProvider = terrainProvider;
// 高斯投影坐标量化地形(有带号)
var tilingScheme = new Cesium.GeoProjectedTilingScheme({
viewer: viewer,
globeScaleDenominators: Cesium.GeoProjectedTilingScheme.GLOBESCALEDENOMINATORSWITHZONENUMBER,
origin: [-2.00375083427892E7, 2.00375083427892E7], //globe服务默认值
extent: [4.149998831453309E7, 4540539.362186294, 4.1584163643142834E7, 4652136.257245313] //layer.json中读取
});
var terrainProvider = new Cesium.GeoCesiumTerrainProvider({
tilingScheme: tilingScheme,
url: '...'
});
viewer.terrainProvider = terrainProvider;
Demo: