管道基础大数据平台系统开发-【前端】-新系統界面
surprise
2024-04-01 2cbbc0e4c0357260f370c47365810608c19131c9
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%;