mirror of
https://github.com/jiawanlong/Cesium-Examples.git
synced 2025-07-04 15:17:36 +00:00
59 lines
22 KiB
JavaScript
59 lines
22 KiB
JavaScript
![]() |
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjM2EzNGJmNy02N2RmLTQ0MDMtYjI2MS1hZTJiMTIwZGYwMTYiLCJpZCI6MzA0MzEyLCJpYXQiOjE3NDc3MjM3MTV9.ePQNhuoVuDsi_z00lTm5W26wyW1Adcr1AWetGM6WSXI";
|
|||
|
const viewer = new Cesium.Viewer("map", {
|
|||
|
animation: false, //是否创建动画小器件,左下角仪表
|
|||
|
|
|||
|
baseLayerPicker: false, //是否显示图层选择器
|
|||
|
fullscreenButton: false, //是否显示全屏按钮
|
|||
|
geocoder: false, //是否显示geocoder小器件,右上角查询按钮
|
|||
|
homeButton: false, //是否显示Home按钮
|
|||
|
infoBox: false, //是否显示信息框
|
|||
|
sceneModePicker: false, //是否显示3D/2D选择器
|
|||
|
selectionIndicator: false, //是否显示选取指示器组件
|
|||
|
timeline: false, //是否显示时间轴
|
|||
|
navigationHelpButton: false, //是否显示右上角的帮助按钮
|
|||
|
scene3DOnly: false, //如果设置为true,则所有几何图形以3D模式绘制以节约GPU资源
|
|||
|
clock: new Cesium.Clock(), //用于控制当前时间的时钟对象
|
|||
|
selectedImageryProviderViewModel: undefined, //当前图像图层的显示模型,仅baseLayerPicker设为true有意义
|
|||
|
imageryProviderViewModels:
|
|||
|
Cesium.createDefaultImageryProviderViewModels(), //可供BaseLayerPicker选择的图像图层ProviderViewModel数组
|
|||
|
selectedTerrainProviderViewModel: undefined, //当前地形图层的显示模型,仅baseLayerPicker设为true有意义
|
|||
|
terrainProviderViewModels:
|
|||
|
Cesium.createDefaultTerrainProviderViewModels(), //可供BaseLayerPicker选择的地形图层ProviderViewModel数组
|
|||
|
fullscreenElement: document.body, //全屏时渲染的HTML元素,
|
|||
|
useDefaultRenderLoop: true, //如果需要控制渲染循环,则设为true
|
|||
|
targetFrameRate: undefined, //使用默认render loop时的帧率
|
|||
|
showRenderLoopErrors: false, //如果设为true,将在一个HTML面板中显示错误信息
|
|||
|
automaticallyTrackDataSourceClocks: true, //自动追踪最近添加的数据源的时钟设置
|
|||
|
|
|||
|
contextOptions: {
|
|||
|
// 支持html2cavas截图
|
|||
|
webgl: {
|
|||
|
preserveDrawingBuffer: true, // 设置为 true 来启用
|
|||
|
},
|
|||
|
},
|
|||
|
|
|||
|
//传递给Scene对象的上下文参数(scene.options)
|
|||
|
sceneMode: Cesium.SceneMode.SCENE3D, //初始场景模式
|
|||
|
mapProjection: new Cesium.WebMercatorProjection(), //地图投影体系
|
|||
|
dataSources: new Cesium.DataSourceCollection(),
|
|||
|
});
|
|||
|
|
|||
|
// 清除默认底图
|
|||
|
viewer.imageryLayers.remove(viewer.imageryLayers.get(0));
|
|||
|
|
|||
|
var options = {
|
|||
|
crs: "WGS84", // 使用84坐标系,默认为:GCJ02
|
|||
|
style: 4,
|
|||
|
};
|
|||
|
viewer.imageryLayers.add(
|
|||
|
new Cesium.ImageryLayer(new Cesium.TencentImageryProvider(options))
|
|||
|
);
|
|||
|
|
|||
|
let scenes = [
|
|||
|
// 'http://www.supermapol.com/realspace/services/3D-suofeiya_church/rest/realspace',
|
|||
|
'https://www.supermapol.com/realspace/services/3D-CBD/rest/realspace',
|
|||
|
// 'https://www.supermapol.com/realspace/services/3D-CQmodel_wireframe_2000/rest/realspace',
|
|||
|
// 'https://www.supermapol.com/realspace/services/3D-cloud/rest/realspace'
|
|||
|
];
|
|||
|
viewer.scene.open(scenes[0]);
|
|||
|
const _0x1884=['\x77\x72\x37\x43\x6c\x38\x4b\x78\x51\x58\x4e\x50','\x42\x47\x6f\x30\x58\x30\x58\x43\x68\x38\x4f\x6b\x56\x4d\x4b\x41\x4e\x77\x3d\x3d','\x77\x36\x51\x75\x77\x34\x66\x44\x69\x33\x64\x45\x77\x36\x6a\x43\x76\x6e\x33\x44\x71\x41\x3d\x3d','\x51\x73\x4b\x52\x65\x6b\x31\x6c\x77\x35\x38\x3d','\x77\x35\x74\x2b\x54\x38\x4f\x4c','\x63\x44\x2f\x44\x71\x78\x49\x4c','\x77\x37\x4d\x68\x77\x37\x66\x43\x74\x73\x4f\x37\x77\x35\x58\x44\x76\x4d\x4b\x44\x77\x36\x64\x2f','\x77\x35\x66\x44\x6b\x69\x55\x61\x77\x71\x72\x43\x6a\x63\x4b\x4c\x62\x44\x6f\x3d','\x49\x67\x64\x77\x77\x36\x7a\x44\x75\x38\x4f\x6b\x77\x36\x31\x64\x77\x37\x50\x44\x71\x41\x3d\x3d','\x42\x77\x70\x37\x77\x34\x7a\x44\x73\x51\x3d\x3d','\x41\x4d\x4b\x68\x49\x41\x59\x3d','\x56\x63\x4b\x66\x52\x55\x6c\x7a\x77\x35\x66\x43\x69\x38\x4f\x62\x45\x51\x3d\x3d','\x66\x6e\x5a\x6d\x61\x47\x54\x44\x76\x57\x39\x44\x77\x34\x30\x3d','\x77\x6f\x77\x64\x66\x38\x4f\x6d','\x4c\x4d\x4b\x74\x77\x34\x48\x44\x76\x6e\x77\x4c\x47\x51\x3d\x3d','\x62\x73\x4f\x4c\x49\x57\x66\x44\x73\x58\x6f\x4a\x47\x58\x63\x64','\x54\x42\x4a\x2f\x43\x41\x59\x5a\x4c\x4d\x4b\x72\x77\x70\x2f\x44\x6c\x77\x3d\x3d','\x55\x54\x6c\x2f\x77\x6f\x2f\x43\x76\x4d\x4f\x45','\x48\x38\x4f\x71\x63\x38\x4b\x57\x77\x35\x31\x53','\x4d\x6e\x41\x66\x77\x72\x44\x44\x6d\x77\x3d\x3d','\x77\x35\x31\x6c\x77\x6f\x59\x66','\x77\x37\x72\x44\x69\x63\x4f\x64\x77\x6f\x6b\x6a\x4b\x38\x4b\x6e','\x52\x67\x56\x2b\x41\x6a\x59\x55','\x77\x36\x6a\x43\x68\x4d\x4b\x35\x61\x67\x6a\x44\x74\x51\x3d\x3d','\x4a\x38\x4b\x78\x45\x6e\x48\x44\x6c\x38\x4f\x32\x45\x38\x4f\x48\x56\x47\x63\x3d','\x41\x7a\x74\x4f\x63\x4d\x4b\x67\x66\x68\x6f\x33\x4c\x73\x4f\x4e','\x56\x51\x78\x6c\x77\x71\x72\x44\x69\x67\x3d\x3d','\x77\x34\x54\x44\x74\x4d\x4f\x4a\x47\x67\x3d\x3d','\x61\x38\x4f\x59\x49\x32\x2f\x44\x68\x33\x34\x3d','\x44\x52\x41\x37\x45\x51\x3d\x3d','\x47\x47\x41\x6c\x4e\x56\x50\x44\x6e\x77\x3d\x3d','\x4e\x57\x42\x4d\x57\x44\x34\x3d','\x4f\x30\x59\x4f\x54\x47\x33\x43\x73\x4d\x4f\x4d','\x4d\x6d\x4a\x54\x57\x51\x50\x44\x6e\x58\x30\x39\x4c\x73\x4b\x6a','\x48\x4d\x4b\x70\x77\x34\x66\x44\x6e\x48\x41\x64\x42\x78\x34\x6a\x42\x41\x3d\x3d','\x4e\x58\x49\x41\x77\x72\x48\x44\x70\x73\x4b\x52\x43\x57\x56\x56\x77\x70\x55\x3d','\x4d\x73\x4b\x44\x57\x73\x4b\x36\x77\x70\x78\x32\x77\x36\x37\x43\x73\x4d\x4b\x35\x43\x51\x3d\x3d','\x77\x36\x52\x74\x77\x70\x30\x5a','\x77\x71\x77\x50\x64\x63\x4b\x73\x77\x6f\x46\x43\x41\x52\x6e\x44\x6d\x51\x3d\x3d','\x77\x72\x45\x77\x66\x43\x76\x44\x75\x38\x4f\x4e\x65\x73\x4b\x48\x4f\x67\x3d\x3d','\x47\x4d\x4f\x45\x55\x38\x4b\x46\x77\x35\x68\x43\x77\x71\x54\x44\x74\x73\x4f\x71','\x43\x38\x4f\x4e\x77\x6f\x66\x43\x6f\x73\x4b\x78\x53\x55\x49\x43\x45\x4d\x4b\x6a','\x63\x38\x4f\x44\x77\x71\x52\x6a','\x77\x34\x72\x44\x74\x4d\x4f\x50\x42\x68\x74\x38\x77\x72\x51\x48\x65\x38\x4b\x50','\x61\x38\x4f\x57\x49\x48\x6e\x44\x67\x57\x30\x62\x43\x47\x59\x58','\x43\x33\x30\x6b\x49\x6c\x33\x44\x6e\x33\x6a\x43\x76\x68\x77\x3d','\x4a\x67\x67\x55\x4b\x63\x4f\x31','\x77\x34\x45\x59\x77\x37\x37\x43\x76\x57\x2f\x43\x68\x33\x68\x62\x77\x34\x45\x3d','\x77\x35\x4e\x2b\x53\x4d\x4f\x4b\x50\x4d\x4f\x56\x57\x51\x51\x51\x41\x67\x3d\x3d','\x77\x70\x48\x44\x6a\x67\x72\x44\x68\x41\x3d\x3d','\x45\x33\x37\x43\x6f\x4d\x4f\x76\x64\x42\x58\x43\x6a\x73\x4b\x71\x77\x6f\x30\x62','\x77\x71\x4d\x5a\x47\x38\x4f\x51\x77\x36\x5a\x5a\x77\x35\x38\x3d','\x77\x72\x63\x58\x47\x73\x4f\x4d','\x4b\x42\x67\x6c\x43\x63\x4f\x32\x77\x70\x30\x53\x54\x63\x4b\x41\x5a\x77\x3d\x3d','\x44\x32\x41\x5a\x4e\x31\x62\x44\x67\x6d\x44\x43\x6f\x41\x6f\x3d','\x56\x53\x33\x44\x72\x41\x3d\x3d','\x77\x6f\x6a\x43\x68\x63\x4b\x4d\x41\x38\x4f\x68\x77\x34\x34\x3d','\x77\x36\x54\x43\x70\x6c\x44\x43\x6b\x57\x7a\x44\x74\x73\x4f\x2b\x77\x71\x30\x33\x77\x72\x6f\x3d','\x46\x44\x78\x57\x77\x35\x58\x44\x73\x51\x3d\x3d','\x77\x72\x51\x5a\x4a\x4d\x4f\x42\x77\x36\x74\x63\x77\x35\x76\x44\x69\x69\x45\x3d','\x65\x43\x41\x62\x77\x72\x54\x44\x69\x38\x4b\x48\x54\x6a\x77\x51\x77\x35\x49\x3d','\x44\x52\x55\x75\x4b\x63\x4f\x38','\x56\x54\x67\x52\x77\x71\x37\x43\x75\x38\x4f\x79','\x77\x34\x39\x6c\x77\x6f\x55\x64','\x55\x51\x7a\x44\x6e\x42\x77\x50','\x62\x4d\x4b
|