From 5e47738f99e307bab1c8a5ee9ecd96d8c7f4a968 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sat, 08 Jan 2022 10:43:01 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/school-web
---
src/components/map/components/dimension.vue | 38 ++++++++++++++++++++++++++++++++++----
1 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/src/components/map/components/dimension.vue b/src/components/map/components/dimension.vue
index 6d1d035..0119fc6 100644
--- a/src/components/map/components/dimension.vue
+++ b/src/components/map/components/dimension.vue
@@ -320,6 +320,36 @@
// that.areaLayer.show = false
// })
+
+ document.querySelector('.dc-zoom-controller').children[1].onclick = function () {
+ if (that.dimensionValue == '3 维') {
+ that.viewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(114.04062292, 27.62666834, 220.0),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(-9),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-34.54),
+ roll: 0.0
+ }
+ })
+ } else {
+ that.viewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(114.039779, 27.629696, 600.0),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0
+ }
+ })
+ }
+ }
}
}
}
@@ -377,10 +407,10 @@
})
} else {
that.tilesetLayer.show = false
- // that.viewer.imageryLayers.remove(that.vecLayer)
- // that.vecLayer = null
- // that.viewer.imageryLayers.remove(that.cvaLayer)
- // that.cvaLayer = null
+ that.viewer.imageryLayers.remove(that.vecLayer)
+ that.vecLayer = null
+ that.viewer.imageryLayers.remove(that.cvaLayer)
+ that.cvaLayer = null
// var provider = new that.DC.Namespace.Cesium.ArcGisMapServerImageryProvider({
// url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/PingXiang25DMapQP/MapServer'
--
Gitblit v1.9.3