From 9463c42e594a66569e49bd781a1fd61aab2d2261 Mon Sep 17 00:00:00 2001 From: hym Date: Sun, 29 Sep 2024 17:12:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=87=E5=AE=9A=E7=9B=B8=E6=9C=BA=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E4=BD=8D=E7=BD=AE=EF=BC=8C=E4=BC=98=E5=8C=96=E7=A7=91?= =?UTF-8?q?=E8=80=83=E8=BD=A8=E8=BF=B9=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=95=88=E6=9E=9C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dataSearch.vue | 5 +++++ src/views/home.vue | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/views/dataSearch.vue b/src/views/dataSearch.vue index 60b2dd1..5e9755e 100644 --- a/src/views/dataSearch.vue +++ b/src/views/dataSearch.vue @@ -448,6 +448,11 @@ export default { this.viewer.scene.globe.showGroundAtmosphere = false this.viewer.scene.postProcessStages.fxaa.enabled = true + this.viewer.camera.setView({ + // 指定相机初始位置 + destination: Cesium.Cartesian3.fromDegrees(110, 18, 10000000) + }); + // 不显示底图 this.viewer.imageryLayers.get(0).show = false diff --git a/src/views/home.vue b/src/views/home.vue index 3e037ad..e605127 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -372,6 +372,11 @@ export default { this.viewer.scene.globe.showGroundAtmosphere = false this.viewer.scene.postProcessStages.fxaa.enabled = true + this.viewer.camera.setView({ + // 指定相机初始位置 + destination: Cesium.Cartesian3.fromDegrees(110, 18, 10000000) + }); + // 改写 Cesium 原生鼠标滚轮事件,地图缩放改为按下 Ctrl + 鼠标滚轮 modifyCesiumMouseWheel(this.viewer); @@ -676,7 +681,7 @@ export default { .guiji { width: 100%; height: auto; - margin: 70px 0; + margin: 50px 0; margin-bottom: 0; display: flex; flex-direction: column; @@ -700,12 +705,15 @@ export default { position: relative; width: 100%; height: 800px; + display: flex; + /* 导航列表居中显示 */ + justify-content: center; + align-items: center; .daohang { position: absolute; - top: 50px; - left: 25%; - width: 50%; + top: 20px; + max-width: 50%; height: 60px; background: rgba($color: #000, $alpha: 0.7); border-radius: 10px;