| | |
| | | const InitMap = { |
| | | earthCtrl: null, |
| | | Viewer: null, |
| | | graticules: null, |
| | | //地图初始化 |
| | | init3DMap() { |
| | | //设置月球坐标系 |
| | | SmartEarth.Cesium.Ellipsoid.WGS84 = new SmartEarth.Cesium.Ellipsoid( |
| | | 1737400.0, |
| | | 1737400.0, |
| | | 1737400.0 |
| | | ); |
| | | SmartEarth.Cesium.ExternalParameter.eliminate = false |
| | | SmartEarth.Cesium.ExternalParameter.changeApproximateTerrainHeights = true |
| | | SmartEarth.Cesium.ExternalParameter.maxTerrainHeight = 2000000; |
| | | SmartEarth.Cesium.ExternalParameter.minTerrainHeight = -2000000; |
| | | SmartEarth.Cesium.ShadowMap.MAXIMUM_DISTANCE = 20000000000; |
| | | window.Cesium = SmartEarth.Cesium |
| | | SmartEarth.Cesium.Ellipsoid.WGS84 = new SmartEarth.Cesium.Ellipsoid(1737400.0, 1737400.0, 1737400.0) |
| | | |
| | | //贴地线 |
| | | |
| | | SmartEarth.Cesium.ExternalParameter.changeApproximateTerrainHeights = true; |
| | | //页面初始化 |
| | | this.earthCtrl = new SmartEarth.EarthCtrl("cesiumContainer", { |
| | | StaticFileBaseUrl: config.StaticFileBaseUrl, |
| | | ellipsoidCoordinates: "MOON", |
| | | ellipsoidCoordinates: "MOON2000", |
| | | timeline: true, |
| | | }); |
| | | |
| | | this.earthCtrl.Viewer.scene.debugShowFramesPerSecond = true |
| | | this.earthCtrl.coreMap.scene.screenSpaceCameraController.enableCollisionDetection = true; |
| | | |
| | | window.earthCtrl = this.earthCtrl; |
| | | |
| | |
| | | sgworld.Creator.SimpleGraphic.edit(true, { editProp: true }); |
| | | //======================= |
| | | window.Viewer.imageryLayers.removeAll(); |
| | | window.setLayer(); |
| | | |
| | | Viewer.scene.globe.depthTestAgainstTerrain = false; // 开启深度测试 |
| | | Viewer.animation.container.style.visibility = "hidden"; |
| | |
| | | //======================= |
| | | //大气层 |
| | | Viewer.scene.globe.showGroundAtmosphere = false; |
| | | window.setLayer(); |
| | | sgworld._Viewer.scene.debugShowFramesPerSecond = false; |
| | | sgworld.Navigate.Stop(); //取消飞行状态 |
| | | sgworld.Navigate.setPosition(-1093596.38, 5729026.12, 4136590.41); |
| | | }, |
| | | showlonlatLine() { |
| | | |
| | | window.graticules = new SmartEarth.Cesium.Graticules( |
| | | earthCtrl.Viewer, |
| | | SmartEarth.Cesium.Color.PALEGREEN |
| | | ); |
| | | // graticules.makeCoordAxiss(); |
| | | earthCtrl.Viewer.scene.preUpdate.addEventListener(function () { |
| | | graticules.update(); |
| | | }); |
| | | }, |
| | | //鼠标左键点击事件添加 |
| | | addMouseLeftClickEvents() { |
| | | if (window.handleLeftClick) { |