// 个别功能需要引入三方js和css 按需引入即可
<link href="lib/Cesium/Widgets/widgets.css" rel="stylesheet">
<script src="lib/Cesium/Cesium.js"></script>
<script src="lib/cesium-d3kit.js"></script>
<div id="viewerContainer"></div>
<script>
this._viewer = new Cesium.Viewer("viewerContainer", { infoBox: false });
this._d3kit = new Cesium.D3Kit(this._viewer)
let layer = this._viewer.imageryLayers.addImageryProvider(new Cesium.GoogleImageryProvider({
style: 'img'
}));
layer.name = '地图', layer.id = 'layer1', layer.show = false;
let layer2 = this._viewer.imageryLayers.addImageryProvider(new Cesium.GoogleImageryProvider({}));
layer2.name = '电子', layer2.id = 'layer2', layer2.show = false;
let layer3 = this._viewer.imageryLayers.addImageryProvider(new Cesium.GoogleImageryProvider({
style: 'ter'
}));
layer3.name = '地形', layer3.id = 'layer3', layer3.show = true;
this._d3kit.showLayerSwitchPanel([layer, layer2, layer3])
</script>