From 37a4a03e1ddef4f66904dccee54b684e73e9a3b2 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 18 Nov 2022 17:32:27 +0800
Subject: [PATCH] 1

---
 src/components/map/components/dimension.vue |   50 +++++++++++++++++---------------------------------
 1 files changed, 17 insertions(+), 33 deletions(-)

diff --git a/src/components/map/components/dimension.vue b/src/components/map/components/dimension.vue
index a156034..9902c2b 100644
--- a/src/components/map/components/dimension.vue
+++ b/src/components/map/components/dimension.vue
@@ -1,15 +1,10 @@
 <template>
     <div class="dimension-cut">
         <!-- <el-button type="primary">{{zoomValue}}</el-button> -->
-        <!-- <el-radio-group
-            v-model="dimensionValue"
-            size="medium"
-            @change="dimensionChange"
-            ref="StateChange"
-        >
-            <el-radio-button label="三 维"></el-radio-button>
-            <el-radio-button label="真三维"></el-radio-button>
-        </el-radio-group>-->
+        <el-radio-group v-model="dimensionValue" size="medium" @change="dimensionChange" ref="StateChange">
+            <!-- <el-radio-button label="三 维"></el-radio-button>
+            <el-radio-button label="真三维"></el-radio-button>-->
+        </el-radio-group>
     </div>
 </template>
 
@@ -46,8 +41,8 @@
 const slLayer = null
 const bzLayer = null
 
-let viewerHeight = 800
-let heightChange = 800
+let viewerHeight = 1000
+let heightChange = 1000
 
 const mixVH = 300
 const maxVH = 1000
@@ -56,6 +51,7 @@
 const twoVH = 500
 const fourVH = 800
 const fiveVH = 1000
+const sixVH = 1500
 
 const heightDifferenceValue = 100
 
@@ -100,7 +96,7 @@
                 [114.03954722, 27.62819644, 100],
                 [114.04006133, 27.628038, 100]
             ],
-            mapCenter: [116.027429, 28.681978, 800]
+            mapCenter: [115.79647126999, 28.6421878133715, 1000]
             // mapCenter: [116.35559028,
             //     27.96548051, 5000]
             // mapCenter: [115.871863, 28.743861, 950.0]
@@ -171,7 +167,7 @@
                     // })
 
                     global.viewer.imageryLayers.addImageryProvider(new global.DC.Namespace.Cesium.SingleTileImageryProvider({
-                        url: '/zhxy/img/bg/bg.png'
+                        url: '/zhjg/img/bg/bg.png'
                     }))
 
                     silhouetteBlue =
@@ -241,28 +237,14 @@
 
                     that.addBaseLayer()
 
-                    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
-                        }
-                    })
                     // 最小
                     global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = mixVH
                     global.eagleViewer.scene.screenSpaceCameraController.minimumZoomDistance = mixVH + 1000
                     // 最大
                     // global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = maxVH
                     // global.eagleViewer.scene.screenSpaceCameraController.maximumZoomDistance = maxVH + 1000
+                    global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 3500
+                    global.eagleViewer.scene.screenSpaceCameraController.maximumZoomDistance = 4500
 
                     // 设置相机缩小时的速率
                     // global.viewer.scene.screenSpaceCameraController._minimumZoomRate = 2000
@@ -740,7 +722,9 @@
             //     return
             // }
 
-            if (height > fiveVH - heightDifferenceValue) {
+            if (height > sixVH - heightDifferenceValue) {
+                viewerHeight = sixVH
+            } else if (height <= fiveVH + heightDifferenceValue && height > fiveVH - heightDifferenceValue) {
                 viewerHeight = fiveVH
             } else if (height <= fourVH + heightDifferenceValue && height > fourVH - heightDifferenceValue) {
                 viewerHeight = fourVH
@@ -777,7 +761,7 @@
             layerGroup.addLayer(DefaultAreaLayer)
             axios
                 .get(
-                    'https://dev.jxpskj.com:8023/arcgis/rest/services/shidalk/MapServer/0/query?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&returnTrueCurves=false&resultOffset=&resultRecordCount=&f=pjson'
+                    'https://dev.jxpskj.com:8023/arcgis/rest/services/jglk/MapServer/0/query?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&returnTrueCurves=false&resultOffset=&resultRecordCount=&f=pjson'
                 )
                 .then((resultData) => {
                     resultData.data.features.forEach((item) => {
@@ -898,7 +882,7 @@
             qxTilesetLayer = new global.DC.TilesetLayer('qxTilesetLayer')
             global.viewer.addLayer(qxTilesetLayer)
 
-            qxTileset = new global.DC.Tileset('/zhxy/qx/tileset.json', {
+            qxTileset = new global.DC.Tileset('/zhjg/qx/tileset.json', {
                 luminanceAtZenith: 0.4,
                 // cullWithChildrenBounds: false,
                 // cullRequestsWhileMoving: false,
@@ -920,7 +904,7 @@
             const that = this
             tilesetLayer = new global.DC.TilesetLayer('tilesetLayer')
             global.viewer.addLayer(tilesetLayer)
-            tileset = new global.DC.Tileset('/zhxy/mx/tileset.json', {
+            tileset = new global.DC.Tileset('/zhjg/mx/tileset.json', {
                 luminanceAtZenith: 0.4,
                 // cullWithChildrenBounds: false,
                 // cullRequestsWhileMoving: false,

--
Gitblit v1.9.3