From 2cbbc0e4c0357260f370c47365810608c19131c9 Mon Sep 17 00:00:00 2001 From: surprise <15810472099@163.com> Date: 星期一, 01 四月 2024 09:31:56 +0800 Subject: [PATCH] 代码更新 --- src/components/Screen/mapsdk.vue | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/components/Screen/mapsdk.vue b/src/components/Screen/mapsdk.vue index e30b5a9..1d85c56 100644 --- a/src/components/Screen/mapsdk.vue +++ b/src/components/Screen/mapsdk.vue @@ -13,6 +13,7 @@ return {} }, mounted() { + this.init3DMap() // this.$bus.$on("changeProject", name => { // if (!yunxuanLayer) { @@ -48,6 +49,7 @@ // "Centermapdiv", // function () { } // ) + this.$store.state.showThematicFlag = false; window.sgworld = new SmartEarth.SGWorld("Centermapdiv", { licenseServer: window.sceneConfig.licenseServer, @@ -55,10 +57,8 @@ window.viewer = window.Viewer = window.sgworld._Viewer; if (is_production) { Viewer.imageryLayers.removeAll(); - - - } + // Viewer.imageryLayers._layers[0].show = false sgworld.Navigate.jumpTo({ //璺宠浆瑙嗚 destination: new Cesium.Cartesian3.fromDegrees(110, 32, 50000000) @@ -73,8 +73,8 @@ }) }, 1000); - if (is_production) { + var base_ulr = window.sceneConfig.baseUrl; if (base_ulr.indexOf('{host}') > -1) { base_ulr = base_ulr.replace("{host}", iisHost) @@ -101,6 +101,7 @@ }) ); Viewer.imageryLayers._layers[2].show = false + this.$store.state.showThematicFlag = true; } else { Viewer.imageryLayers.addImageryProvider( new Cesium.UrlTemplateImageryProvider({ @@ -118,7 +119,8 @@ // url: gaoDeBaseUrl[2].url, // }) // ) - Viewer.imageryLayers._layers[1].show = false + Viewer.imageryLayers._layers[1].show = false; + this.$store.state.showThematicFlag = true; } @@ -137,12 +139,13 @@ // Viewer.terrainProvider = new Cesium.CesiumTerrainProvider({ // url: demLayer, // }) - var option = { - url: window.sceneConfig.SGUrl, - layerName: window.sceneConfig.mptName, - requestVertexNormals: true, - }; - window.terrainLayer = sgworld.Creator.sfsterrainprovider("", option, "", true, ""); + + // var option = { + // url: window.sceneConfig.SGUrl, + // layerName: window.sceneConfig.mptName, + // requestVertexNormals: true, + // }; + // window.terrainLayer = sgworld.Creator.sfsterrainprovider("", option, "", true, ""); //鏀瑰彉澶╃┖棰滆壊涓洪粦鑹� Viewer.scene.skyBox.show = false //鍏抽棴澶╃┖鐩掞紝鍚﹀垯浼氭樉绀哄ぉ绌洪鑹� //鑳屾櫙閫忔槑 @@ -158,6 +161,7 @@ height: 100%; width: 100%; } + #Centermapdiv { height: 100%; width: 100%; -- Gitblit v1.9.3