UI控件设置

去掉cesium默认的版权信息:

在style样式中添加 .cesium-widget-credits {display:none !important}

去掉动画控件、地址搜索控件、图层选择控件、操作指南控件:

var viewe = new Cesium.Viewer("cesiumDiv",{

  animation:false,

  basicLayerPicker:false,

  geocoder:false,

  navigationHelpButton:false,

  timeline:false

})

自定义默认视点

要注意必须是在初始化Cesium.Viewer之前设置:

var china_extent = Cesium.Rectangle.fromDegrees(100,10,120,70);

Cesium.Camera.DEFAULT_VIEW_RECTANGLE = china_extent;

Cesium.Camera.DEFAULT_VIEW_FACTOR = 0;

猜你喜欢

转载自www.cnblogs.com/GIS-Yangol/p/10442658.html