cesium基础组件的显示与隐藏
方法一
/* 通过css控制组件显隐及位置 */
.cesium-viewer-toolbar, /*右上角按钮*/
.cesium-viewer-animationContainer,/*左下角动画控件*/
.cesium-viewer-timelineContainer,/*时间线*/
.cesium-viewer-bottom /*logo信息*/
{
display: none;
}
/* 隐藏logo图片 */
.cesium-widget-credits {
display: none;
}
.cesium-viewer-fullscreenContainer { /* 全屏按钮*/
display: none !important;
}
方法二
const viewer = new Cesium.Viewer('container',{
// animation:false,//动画小组件
// baseLayerPicker:false,//地图组件,请选择三维数字地球的底图(image and terrain)
// fullscreenButton:false,//全屏组件
// vrButton:false, // VR模式
// geocoder:false,//地理编码搜索组件
// homeButton:false,//首页 点击之后视图将跳转到默认视角
// infoBox:false,//信息框
// sceneModePicker:false,//场景模式 切换2D 3D和 Columbus View(cv)模式
// selectionIndicator:false,//是否显示选取指示组件
// navigationHelpButton:false,//帮助提示,如何操作数字地球
// // 如果最初应该看到导航说明,则为true,如果直到用户明确单击该按钮,则该按钮提示不显示,否则为true
// navigationInstructionsInitiallyVisible:false,
// skyBox:new Cesium.SkyBox({
// mapProjection:new Cesium.WebMercatorProjection(),
// }),//天空盒效果
// timeline:false,//时间轴
})
//隐藏左下角logo
// viewer._cesiumWidget._creditContainer.style.display ='none'

浙公网安备 33010602011771号