北京经济技术开发区经开区虚拟城市项目-【前端】-移动端Web
lixuliang
2024-05-08 f5233339920a59103d53e8efadc6f3f5d0b64f31
src/components/viewer.vue
@@ -4,15 +4,15 @@
    <div id="sdkContainer" @click="clicktoclose"></div>
    <!-- 页面标题 -->
    <div class="titleBg">
    <!-- <div class="titleBg">
      <img src="@/assets/img/title/title.png" />
    </div>
    </div> -->
    <!-- 历史影像 -->
    <my-history v-if="state.show"></my-history>
    <!-- 历史影像关闭按钮 -->
    <div class="colseBtn" v-if="state.show" @click="closeHistory(false)">
    <!-- <div class="colseBtn" v-if="state.show" @click="closeHistory(false)">
      <img class="searchBtn" src="@/assets/closeinput1.png" />
    </div>
    </div> -->
    <!-- 右侧导航框 -->
    <my-navigation-bar></my-navigation-bar>
    <!-- 搜索框 -->
@@ -24,7 +24,7 @@
    <!-- 原左下菜单 -->
    <!-- <my-menu v-on:getshowsta="datafromchild" ref="menu"></my-menu> -->
    <!-- 左下快捷区域(复位、指北等) -->
    <my-left-bottom :test="childrendata"></my-left-bottom>
    <!-- <my-left-bottom :test="childrendata"></my-left-bottom> -->
    <!-- 右下快捷区域(放大缩小) -->
    <my-right-bottom :test="childrendata"></my-right-bottom>
@@ -34,7 +34,7 @@
    <!-- 位置面板 -->
    <my-collection-panel></my-collection-panel>
    <!-- 指北针面板 -->
    <my-direction-panel></my-direction-panel>
    <!-- <my-direction-panel></my-direction-panel> -->
    <!-- 新增收藏面板 -->
    <my-add-collection-panel></my-add-collection-panel>
    <!-- 窨井、摄像头统计面板 -->
@@ -51,6 +51,8 @@
    <my-layer-tree-panel></my-layer-tree-panel>
    <!-- 土地管理弹窗 -->
    <my-land-admin-info></my-land-admin-info>
    <my-slider></my-slider>
    <my-poplayer></my-poplayer>
  </div>
</template>
<script>
@@ -76,7 +78,10 @@
import layerTreePanel from "./sideMenu/layerTreePanel/main.vue";
import history from "./poplayer/history.vue";
import landAdminInfo from "./poplayer/landAdmin.vue";
import mainPoplayer from "./poplayer/poplayer.vue";
import sliderAlpha from "./sideMenu/sliderAlpha/main.vue";
import Axios from "axios";
export default {
  name: "viewer",
  components: {
@@ -98,6 +103,8 @@
    "my-layer-tree-panel": layerTreePanel,
    "my-history": history,
    "my-land-admin-info": landAdminInfo,
    "my-slider": sliderAlpha,
    "my-poplayer": mainPoplayer,
  },
  data() {
    return {
@@ -126,6 +133,7 @@
      let that = this;
      let option = {
        // licenseServer: "http://183.162.245.49:18080",
        // StaticFileBaseUrl: "../../Mobile/static/CimSDK/",
        url: "./static/img/cesium/earth.jpg",
        toolbar: false,
        // fullscreenButton: true,
@@ -163,6 +171,9 @@
      );
      window.Viewer = sgworld._Viewer;
      Viewer.shadows = false;
      Viewer.scene.fxaa = false;
      Viewer.scene.postProcessStages.fxaa.enabled = false;
      window.Viewer.scene.globe.maximumScreenSpaceError = 4 / 3;
      that.showBottom();
      window.Viewer.scene.screenSpaceCameraController.minimumZoomDistance = 100; //相机的高度的最小值
      // window.Viewer.scene.screenSpaceCameraController.maximumZoomDistance = 38000; //相机高度的最大值
@@ -391,7 +402,8 @@
  width: 100%;
  height: 100%;
  background: black;
  position: absolute !important;
  /* position: absolute !important; */
  z-index: 0;
}
.titleBg {
@@ -415,12 +427,14 @@
.bottomLeft {
  display: none;
}
.colseBtn {
  position: absolute;
  z-index: 2;
  top: 0.55rem;
  left: 0.2rem;
}
.colseBtn img {
  width: 30px;
}