From 1b560b7103c3b4874c2cfd42ca2a29d3b9f61cba Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 04 Jan 2022 18:25:49 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/school-web
---
src/components/mobilemap/index.vue | 95 +++++++++++++++++++++++++++--------------------
src/styles/mobile/popup.scss | 5 +-
src/store/modules/mobile.js | 14 ++++---
3 files changed, 66 insertions(+), 48 deletions(-)
diff --git a/src/components/mobilemap/index.vue b/src/components/mobilemap/index.vue
index 8fa8151..330280f 100644
--- a/src/components/mobilemap/index.vue
+++ b/src/components/mobilemap/index.vue
@@ -367,9 +367,9 @@
e.position,
[e.wgs84Position.lng, e.wgs84Position.lat],
{
- name: e.layer._bid,
- address: e.layer.type,
- introduce: e.layer._id,
+ name: e.overlay.attr.name,
+ address: e.layer._id,
+ introduce: e.overlay.attr.id,
data: e,
}
);
@@ -471,45 +471,35 @@
const newLayer = usetowpointfive();
// 2.5D贴图↑
let startPoint;
- if (false) {
+ if (true) {
startPoint = () => {
- viewer.flyTo(tileset);
- // that.$store.dispatch("mapFlyTo", {
- // //飞入
- // lntLat: [115.87988885, 28.72502592, 2100],
- // // lntLat: [115.87186406, 28.74449337, 1200],
- // // lntLat: [121.50492752204283, 31.21567802276832, 2530],
- // heading: 0,
- // pitch: -45,
- // roll: 0,
- // noOpen: true,
- // });
+ let doit2 = (int) => {
+ viewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(
+ // 114.0351,
+ // 27.6314,
+ // 200.0
+ int[0],
+ int[1],
+ int[2]
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(108),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-26.46),
+ roll: 0.0,
+ },
+ });
+ };
+ that.dimension == "2.5D"
+ ? doit2([114.03928791, 27.62954732, 360.0])
+ : // : doit([116.39038494750986, 39.902393222208644, 330.0]);
+ // doit("建模");
+ doit2([114.0351, 27.6314, 300.0]);
};
- setTimeout((res) => {
- //转圈
- that.$store.dispatch("mapFlyTo", {
- lntLat: [111.25036579, 34.83767277, 11443175.85],
- heading: 0,
- pitch: -90,
- roll: 0,
- noOpen: true,
- fn: function () {
- // viewer.flyTo(tileset);
- // viewer.flyTo(provider);
- //飞入起始点
- // that.$store.dispatch("mapFlyTo", {
- // lntLat: [115.87186406, 28.74449337, 1200],
- // heading: 0,
- // pitch: -45,
- // roll: 0,
- // noOpen: true,
- // });
-
- startPoint();
- },
- });
- // viewer.flyTo(tileset);
- }, 2500);
} else {
startPoint = (val) => {
// viewer.zoomToPosition(
@@ -543,6 +533,7 @@
},
});
} else {
+ // console.log(123456);
that.$store.dispatch("mapFlyTo", {
lntLat: [+int[0] + 0.012, int[1], int[2]],
// 指向
@@ -559,6 +550,7 @@
? doit([114.03928791, 27.62954732, 360.0])
: // : doit([116.39038494750986, 39.902393222208644, 330.0]);
doit("建模");
+ // doit(114.03925, 27.6265, 360.0);
};
// startPoint(1);
}
@@ -627,7 +619,30 @@
if (that.dimension == "2.5D") {
that.$store.commit("MSET_DIMENSION", "2.5D"); //切换2.5D设置
} else if (that.dimension == "3D") {
+ // setTimeout((res) => {
+ // that.$store.dispatch("mapFlyTo", {
+ // lntLat: [111.25036579, 34.83767277, 11443175.85],
+ // heading: 0,
+ // pitch: -90,
+ // roll: 0,
+ // noOpen: true,
+ // fn: function () {
+ // viewer.flyTo(tileset);
+ // viewer.flyTo(provider);
+ //飞入起始点
+ // that.$store.dispatch("mapFlyTo", {
+ // lntLat: [115.87186406, 28.74449337, 1200],
+ // heading: 0,
+ // pitch: -45,
+ // roll: 0,
+ // noOpen: true,
+ // });
+
+ // startPoint();
that.$store.commit("MSET_DIMENSION", "3D"); //切换3D设置
+ // },
+ // });
+ // }, 2000);
}
if (false) {
//镜头改变示例
diff --git a/src/store/modules/mobile.js b/src/store/modules/mobile.js
index 471312e..ac5f790 100644
--- a/src/store/modules/mobile.js
+++ b/src/store/modules/mobile.js
@@ -110,6 +110,8 @@
// },
//切换2D和2.5D
MSET_DIMENSION(state, data) {
+ //关闭弹窗
+
//3d,2.5d转换事件
state.dimension = data;
if (data == "3D") {
@@ -132,13 +134,13 @@
// state.mviewer.flyTo(state.tileset);
//3D视角不限制
- state.mviewer.scene.screenSpaceCameraController.minimumZoomDistance = 100;
+ state.mviewer.scene.screenSpaceCameraController.minimumZoomDistance = 80;
// 最大
state.mviewer.scene.screenSpaceCameraController.maximumZoomDistance = 4000000;
// 设置相机缩小时的速率
- state.mviewer.scene.screenSpaceCameraController._minimumZoomRate = 3000;
+ state.mviewer.scene.screenSpaceCameraController._minimumZoomRate = 10000;
// 设置相机放大时的速率
- state.mviewer.scene.screenSpaceCameraController._maximumZoomRate = 3000;
+ state.mviewer.scene.screenSpaceCameraController._maximumZoomRate = 5906376272000;
// 视角平移
state.mviewer.scene.screenSpaceCameraController.enableRotate = true;
// 视角缩放
@@ -154,7 +156,7 @@
};
state.tilesetLayer.show = false; //隐藏3d图形
state.newLayer = state.usetowpointfive(); //添加2.5d图形贴片
- state.wallLayer.show = true; //打开瀑布
+ state.wallLayer.show = false; //打开瀑布
state.startPointFn(); //移动默认视角
//2.5D视角限制
@@ -193,8 +195,6 @@
},
setMobileWindows({ state, commit, dispatch }, data) {
// 打开随地图移动窗口
- // 关闭前一个弹窗?
- dispatch("closeMobileWindowsDom");
let clas, Flys;
const nowHeight = Math.ceil(
state.mviewer.camera.positionCartographic.height
@@ -440,6 +440,8 @@
// console.log(global.DC.Namespace.Cesium.Matrix4.IDENTITY)
},
MSET_DIMENSIONS({ state, commit, dispatch }, val) {
+ //关闭弹窗
+ dispatch("closeMobileWindowsDom");
//3d,2.5d转换事件
commit("MSET_DIMENSION", val);
//控制高度
diff --git a/src/styles/mobile/popup.scss b/src/styles/mobile/popup.scss
index a9428e0..b1c8595 100644
--- a/src/styles/mobile/popup.scss
+++ b/src/styles/mobile/popup.scss
@@ -139,6 +139,7 @@
width: 100%;
height: auto;
// border: 1px solid red;
+ word-wrap: break-word;
text-indent: 2em;
color: #fff;
}
@@ -502,10 +503,10 @@
position: fixed;
bottom: 6px;
left: 7px;
- background-color: #000;
+ background-color: rgb(33, 150, 243);
color: #fff;
z-index: 1;
font-size: 13px;
border-radius: 5px;
- padding: 3px 8px 4px;
+ padding: 4px 10px 5px;
}
--
Gitblit v1.9.3