From 92291bdc16443dca885956d74644f2abe04eaf6f Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期五, 15 九月 2023 17:10:46 +0800 Subject: [PATCH] 经纬度网格,SDK版本更新 --- src/assets/js/Map/index.js | 34 ++++++++++++++-------------------- 1 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/assets/js/Map/index.js b/src/assets/js/Map/index.js index 48f0f30..a51a32a 100644 --- a/src/assets/js/Map/index.js +++ b/src/assets/js/Map/index.js @@ -6,24 +6,27 @@ 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; @@ -38,6 +41,7 @@ sgworld.Creator.SimpleGraphic.edit(true, { editProp: true }); //======================= window.Viewer.imageryLayers.removeAll(); + window.setLayer(); Viewer.scene.globe.depthTestAgainstTerrain = false; // 寮�鍚繁搴︽祴璇� Viewer.animation.container.style.visibility = "hidden"; @@ -45,21 +49,11 @@ //======================= //澶ф皵灞� 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) { -- Gitblit v1.9.3