<template>
|
<div class="body_box">
|
<div
|
id="cesiumContainer"
|
style="width: 100%; height: 100%; position: absolute"
|
></div>
|
<export-map
|
v-if="layerExportshow"
|
@SETexportMap="SETexportMap"
|
></export-map>
|
<menus></menus>
|
<bottom-btn></bottom-btn>
|
</div>
|
</template>
|
|
<script lang="ts" setup>
|
import {
|
ref,
|
onMounted,
|
onBeforeUnmount,
|
reactive,
|
defineProps,
|
defineEmits,
|
} from "vue";
|
//左侧菜单
|
import menus from "@/views/menus.vue";
|
//底部菜单
|
import bottomBtn from "@/components/bottomBtn.vue";
|
import exportMap from "./export/exportMap.vue";
|
import InitMap from "@/assets/js/Map/index.js";
|
// import * as SmartEarth from "../../public/CIMSDK/index.js";
|
// import * as SmartEarth from "../assets/js/CIMSDK/index.js";
|
let map;
|
var viewer;
|
const layerExportshow = ref(false);
|
const init = () => {
|
viewer = InitMap.Viewer;
|
map = InitMap.sgworld;
|
};
|
//关闭状态
|
const SETexportMap = (res) => {
|
layerExportshow.value = res;
|
};
|
const functionForJs = (res) => {
|
switch (res.type) {
|
case "exportMap":
|
layerExportshow.value = res.value;
|
|
break;
|
}
|
};
|
onMounted(() => {
|
// console.log(SmartEarth);
|
InitMap.init3DMap();
|
init();
|
|
window.functionForJs = functionForJs;
|
});
|
</script>
|
<style lang="less" scoped>
|
.body_box {
|
width: 100%;
|
height: 100%;
|
position: absolute;
|
}
|
</style>
|