From a358c49de4680dcde00d543043ef6694b92e7bd1 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 07 Nov 2024 17:18:55 +0800
Subject: [PATCH] global.$viewer更换为window.$viewer 地下管网加载测试 园区范围加载测试
---
src/hooks/initMap.js | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/hooks/initMap.js b/src/hooks/initMap.js
index 2675406..5569c85 100644
--- a/src/hooks/initMap.js
+++ b/src/hooks/initMap.js
@@ -2,7 +2,7 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2024-10-25 15:09:55
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-11-04 18:08:12
+ * @LastEditTime: 2024-11-07 16:15:48
* @FilePath: \bigScreen\src\hooks\initMap.js
* @Description:
*
@@ -15,7 +15,6 @@
export function readyViewer () {
const Cesium = DC.getLib('Cesium')
- const { appContext } = getCurrentInstance()
const store = useMap()
function initMap () {
@@ -28,10 +27,9 @@
viewer = new DC.Viewer('viewer-container')
- const global = appContext.config.globalProperties
- global.$viewer = viewer
+ window.$viewer = viewer
- global.$viewer.zoomToPosition(new DC.Position(
+ window.$viewer.zoomToPosition(new DC.Position(
115.1048036679409,
27.276835758787513,
4000,
@@ -39,8 +37,6 @@
-90,
0
), () => {
-
-
store.setLoadMap(true)
})
})
--
Gitblit v1.9.3