<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>地形数据</title>
<link href="./css/widgets.css" rel="stylesheet">
<link href="./css/bootstrap.min.css" rel="stylesheet">
<link href="./css/pretty.css" rel="stylesheet">
<script src="./js/jquery.min.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script src="./js/bootstrap-select.min.js"></script>
<script src="./js/require.min.js" data-main="js/main"></script>
<script src="./js/tooltip.js"></script>
<script src="./js/config.js"></script>
</head>
<body>
<button id='hide'>隐藏地形</button>
<button id='show'>显示地形</button>
<div id="container" style="width: 100%; height: 100%;"></div>
<script>
function onload(Cesium) {
var viewer = new Cesium.Viewer('container');
var original = viewer.terrainProvider;
viewer.imageryLayers.addImageryProvider(new Cesium.TiandituImageryProvider({
token: URL_CONFIG.TOKEN_TIANDITU
}));
viewer.imageryLayers.addImageryProvider(new Cesium.TiandituImageryProvider({
mapStyle : Cesium.TiandituMapsStyle.CIA_C,
token: URL_CONFIG.TOKEN_TIANDITU
}));
viewer.scene.camera.setView({
destination : new Cesium.Cartesian3.fromDegrees(x,y,z)
});
var terrainProvider = new Cesium.CesiumTerrainProvider({
url : "http://localhost:8090/iserver/services/3D-xxx/rest/realspace/datas/xxx"
requestWaterMask : true,
requestVertexNormals : true,
isSct : true
});
$("#hide").click(function(){
viewer.terrainProvider = original;
});
$("#show").click(function(){
viewer.terrainProvider = terrainProvider;
});
}
</script>
</body>
</body>
</html>
Supermap WebGL地形隐藏
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...