From 4dab9528d8e69c0c3f8ce03a7d4617bb13ecec8d Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Thu, 31 Mar 2022 14:24:24 +0800
Subject: [PATCH] +注释

---
 src/store/modules/mobile.js |  104 +++++++++++++++++++++++++--------------------------
 1 files changed, 51 insertions(+), 53 deletions(-)

diff --git a/src/store/modules/mobile.js b/src/store/modules/mobile.js
index 13f35b7..f2ea162 100644
--- a/src/store/modules/mobile.js
+++ b/src/store/modules/mobile.js
@@ -295,49 +295,56 @@
                         maximumLevel: 18
                     })
                 )
-                global.viewer.imageryLayers.addImageryProvider(
-                    new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
-                        url: "http://arcgis.jxpskj.com:6080/arcgis/rest/services/FZ25DMap/MapServer/WMTS",
-                        layer: "fzsw2019",
-                        style: "default",
-                        tileMatrixSetID: "default028mm",
-                        format: "image/jpgpng",
-                        tilingScheme: new global.DC.Namespace.Cesium.GeographicTilingScheme(),
-                        maximumLevel: 19,
-                        tileMatrixLabels: [
-                            "0",
-                            "1",
-                            "2",
-                            "3",
-                            "4",
-                            "5",
-                            "6",
-                            "7",
-                            "8",
-                            "9",
-                            "10",
-                            "11",
-                            "12",
-                            "13",
-                            "14",
-                            "15",
-                            "16",
-                            "17",
-                            "18",
-                            "19",
-                        ],
-                    })
-                );
 
                 window.tilesetLayer.show = false // 隐藏3d图形
                 window.newLayer = window.usetowpointfive() // 添加2.5d图形贴片
                 window.wallLayer.show = false // 打开瀑布
                 window.startPointFn() // 移动默认视角
                 window.areaLayer.show = true // 绿布
-                // 2.5D视角限制
-                global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = state.zoomRange[0]
-                // 最大
-                global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = state.zoomRange[1]
+                if (state.zoomRange[3]) {
+                    global.viewer.imageryLayers.addImageryProvider(
+                        new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
+                            url: "http://arcgis.jxpskj.com:6080/arcgis/rest/services/FZ25DMap/MapServer/WMTS",
+                            layer: "fzsw2019",
+                            style: "default",
+                            tileMatrixSetID: "default028mm",
+                            format: "image/jpgpng",
+                            tilingScheme: new global.DC.Namespace.Cesium.GeographicTilingScheme(),
+                            maximumLevel: 19,
+                            tileMatrixLabels: [
+                                "0",
+                                "1",
+                                "2",
+                                "3",
+                                "4",
+                                "5",
+                                "6",
+                                "7",
+                                "8",
+                                "9",
+                                "10",
+                                "11",
+                                "12",
+                                "13",
+                                "14",
+                                "15",
+                                "16",
+                                "17",
+                                "18",
+                                "19",
+                            ],
+                        })
+                    );
+                    // 2.5D视角限制
+                    // global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 50
+                    // // 最大
+                    // global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 9999999999
+                } else {
+                    // 2.5D视角限制
+                    global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = state.zoomRange[0]
+                    // 最大
+                    global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = state.zoomRange[1]
+                }
                 // 设置相机缩小时的速率
                 global.viewer.scene.screenSpaceCameraController._minimumZoomRate = 2000
                 // 设置相机放大时的速率
@@ -412,9 +419,9 @@
                 window.drawALineLayerMany = null
                 state.isOpenDrawALineMany = false
             }
-            if (window.drawALineLayerMany) {
-                window.drawALineLayerMany.remove()
-                window.drawALineLayerMany = null
+            if (window.drawAPointLayerMany) {
+                window.drawAPointLayerMany.remove()
+                window.drawAPointLayerMany = null
                 state.isOpenDrawALineMany = false
             }
         },
@@ -473,6 +480,7 @@
             // 传递响应数据
             commit('MSET_QUERY', data)
             // console.log(data);
+            //配置移动和弹窗的偏移   flys是飞行的偏移  clas是弹窗的偏移
             if (state.dimension == '3D') {
                 Flys = [
                     +data.lntLat[0] + 0.01197,
@@ -506,6 +514,7 @@
                 ]
             }
             window.tancuanPosition = data.position;
+            //useJWD开启状态  window.tancuanPosition就是根据经纬度来计算出来的 如果有原有的 data.position 把值变为false
             if (data.useJWD) {
                 window.ellipsoid = global.viewer.scene.globe.ellipsoid
                 window.cartographic = global.DC.Namespace.Cesium.Cartographic.fromDegrees(
@@ -939,6 +948,7 @@
                     // window.drawALineLayerdrawALine (paths, res.data.route.paths[0].strategy);
                 })
             // }
+            //包装绘画工具
             window.drawALineLayerdrawALine = (pathsour) => {
                 const paths = pathsour.steps
                 const titles = pathsour.strategy
@@ -989,19 +999,7 @@
             // 检查是否存在路线
             commit('removePolyline')
             commit('removePolylineMany')
-            const color =
-                global.DC.Namespace.Cesium.Color.fromCssColorString('#409EFF')
-            window.polylinematerialdaohang = new global.DC.PolylineTrailMaterialProperty({
-                // color: color,
-                // speed: 10
-                color: global.DC.Namespace.Cesium.Color.fromBytes(10, 255, 10),
-                speed: 60,
-                image: '/img/icon/right.png',
-                repeat: {
-                    x: 320,
-                    y: 1
-                }
-            })
+
             window.drawALineLayer = new global.DC.VectorLayer('lineLayer')
             global.viewer.addLayer(window.drawALineLayer)
 

--
Gitblit v1.9.3