var viewer = new Cesium.Viewer("cesiumContainer", {
timeline: false,
homeButton: true,
infoBox: false,
animation: false,
selectionIndicator: false,
fullscreenButton: false,
sceneModePicker: false,
navigationHelpButton: false,
geocoder: false,
scene3DOnly: true,
terrainProvider: new Cesium.EllipsoidTerrainProvider({}),
});
var imageryProviderViewModels = viewer.baseLayerPicker.viewModel.imageryProviderViewModels;
var terrainProviderViewModels = viewer.baseLayerPicker.viewModel.terrainProviderViewModels;
viewer.baseLayerPicker.viewModel.selectedImagery = imageryProviderViewModels[imageryProviderViewModels.length - 1];
viewer.baseLayerPicker.viewModel.selectedTerrain = terrainProviderViewModels[0];
viewer.imageryLayers.layerAdded.addEventListener(function () {
setTimeout(function () {
viewer.imageryLayers.orderByZIndex();
}, 200);
});
viewer.scene.debugShowFramesPerSecond = true;
本文转自 https://blog.csdn.net/chenguizhenaza/article/details/120061215,如有侵权,请联系删除。