Cesium加载影像和地形数据+开启高程遮挡效果+视点定位+定时更新
// 初始化Cesium var viewer = new Cesium.Viewer('cesiumContainer', { /*imageryProvider : new Cesium.ArcGisMapServerImageryProvider({ url : '//services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer' }),*/ imageryProvider : new Cesium.BingMapsImageryProvider({ url : 'https://dev.virtualearth.net', key : 'get-yours-at-https://www.bingmapsportal.comAs93Kqb5i_S8wSYMm_vv9iehsxejWxKkx6Dp7z2IqhKcs8SJjKCit5RSWglMPx-x',//'get-yours-at-https://www.bingmapsportal.com/', mapStyle : Cesium.BingMapsStyle.AERIAL }), terrainProvider:new Cesium.CesiumTerrainProvider({ url:"http://111.198.29.34:8085/GX_Dam_DEM" }), baseLayerPicker : false }); //为true时,球体会有高程遮挡效果(在没有地形时候也会有高程遮挡效果)。 viewer.scene.globe.depthTestAgainstTerrain = true;
// 定位视点
viewer.camera.flyTo({
destination : Cesium.Cartesian3.fromDegrees(108.24274, 22.3002162, 10000.0)
});
setInterval(
function(){
},
200
);