From 64b64d0bba16f20b123ffb17e08cbf884532785f Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 18 Nov 2022 15:45:47 +0800
Subject: [PATCH] 1
---
src/components/mobilemap/index.vue | 27 ++++++++++++++++++++++-----
1 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/src/components/mobilemap/index.vue b/src/components/mobilemap/index.vue
index a4135ba..6f70a3c 100644
--- a/src/components/mobilemap/index.vue
+++ b/src/components/mobilemap/index.vue
@@ -10,11 +10,8 @@
<!-- 控制↓ -->
<mobileLeftNav ref="mobileLeftNav"></mobileLeftNav>
<mobileCortrol ref="mobileCortrol"></mobileCortrol>
- <mobileCortrolButtom
- ref="mobileCortrolButtom"
- :mapCenter="mapCenter"
- :frislayertHeight="frislayertHeight"
- ></mobileCortrolButtom>
+ <mobileCortrolButtom ref="mobileCortrolButtom" :mapCenter="mapCenter" :frislayertHeight="frislayertHeight">
+ </mobileCortrolButtom>
<mobileCortrolSearch ref="mobileCortrolSearch"></mobileCortrolSearch>
<!-- 控制↑ -->
<!-- 控制大弹窗的弹窗 -->
@@ -657,6 +654,25 @@
}
})
+ global.DC.Namespace.Cesium.Camera.DEFAULT_VIEW_RECTANGLE = global.DC.Namespace.Cesium.Rectangle.fromDegrees(115.788116, 28.638531, 151.805469, 28.646045)
+
+ global.viewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees(
+ that.mapCenter[0],
+ that.mapCenter[1],
+ that.mapCenter[2]
+ ),
+ orientation: {
+ // 指向
+ heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0
+ }
+ })
+
const primitiveArr = global.viewer.scene.primitives._primitives
global.viewer.scene.primitives.remove(primitiveArr[0])
@@ -1034,6 +1050,7 @@
height: 100%;
position: relative;
}
+
.heights {
background-color: #fff;
font-size: 24px;
--
Gitblit v1.9.3