清除可见范围内工具及其logo
timeline:false,//隐藏时间轴
animation:false,//动画控件
geocoder:false,//搜索按钮
homeButton:false,//主页按钮o
sceneModePicker:false,//模式控件
baseLayerPicker:false,//图层选择
navigationHelpButton:false,//帮助手势
fullscreenButton:false, //全屏按钮
隐藏logo.cesium-viewer-bottom {
.cesium-viewer-bottom {display: none !important;}
<template>
<div id="cesiumContent"></div>
</template>
<script setup>
import { onMounted} from 'vue'
import * as Cesium from 'cesium'
console.log(Cesium);
onMounted(()=>{
// token
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI1MjEzMTIyZS0wZTYxLTRmYmUtOTAwMC02OTI0YTUzYjNhMDciLCJpZCI6MjMyMjU3LCJpYXQiOjE3MjI1ODkxNjh9.ojMT5Gn6hJUBUywEzDwdZnR3-8rEO7vJ8z6bSB4HxEY'
// viewer所有api的开始
const viewer = new Cesium.Viewer('cesiumContent',{
timeline:false,//隐藏时间轴
animation:false,//动画控件
geocoder:false,//搜索按钮
homeButton:false,//主页按钮
sceneModePicker:false,//模式控件
baseLayerPicker:false,//图层选择
navigationHelpButton:false,//帮助手势
fullscreenButton:false, //全屏按钮
})
})
</script>
<style>
#cesiumContent{
width:100vw;
height:100vh;
overflow: hidden;
}
//隐藏logo
.cesium-viewer-bottom {
display: none !important;
}
</style>