title: 地图打印组件
[[toc]]
::: warning 注意
属性名 | 说明 | 类型 | 是否必须 |
---|---|---|---|
viewer | 视图 | obj | 是 |
mapOptions | 存储运行环境 | obj | 是 |
<jt-popup title="地图打印" showfooter="false" longheader="1" right="calc(50% - 480rem)" width="960rem" top="calc(50% - 270rem)" height="600rem">
<jt-print :viewer="viewer" :options="mapOptions"></jt-print>
</jt-popup>
<script setup>
import {
onBeforeUnmount,
inject,
ref
} from "vue";
import {
useWidget
} from "@/common/store/widget"
const {
disable,
currentWidget
} = useWidget();
import store from '@/store/index';
/**
* 获取地图对象
*/
const getMapInstance = inject("getMapInstance");
let jtMap3d = getMapInstance();
let viewer = jtMap3d._viewer;
const isshowfooter = ref(false)
const mapOptions = {
runtimeEnvironment: store.appStore.runtimeEnvironment
}
/**
* 即将销毁
*/
onBeforeUnmount(() => {
// 释放当前的widget
disable(currentWidget.name);
});
</script>