shuishen
2022-03-31 3807d5af98a271678464766cd4d19dbe1e3e07c6
src/store/modules/mobile.js
@@ -382,6 +382,7 @@
            global.viewer.camera.setView({
                // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
                // fromDegrees()方法,将经纬度和高程转换为世界坐标
                // eslint-disable-next-line new-cap
                destination: new global.DC.Namespace.Cesium.Cartesian3.fromDegrees(
                    // 114.0351,
                    // 27.6314,
@@ -484,6 +485,7 @@
            // 传递响应数据
            commit('MSET_QUERY', data)
            // console.log(data);
            // 配置移动和弹窗的偏移   flys是飞行的偏移  clas是弹窗的偏移
            if (state.dimension == '3D') {
                Flys = [
                    +data.lntLat[0] + 0.01197,
@@ -517,6 +519,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(
@@ -530,6 +533,7 @@
            }
            // 定制化窗体
            // eslint-disable-next-line new-cap
            window.popupsDom = new global.DC.mobileDivForms(global.viewer, {
                domId: 'mobilePopup',
                title: data.query.name || '成教楼  ',
@@ -950,6 +954,7 @@
                    // window.drawALineLayerdrawALine (paths, res.data.route.paths[0].strategy);
                })
            // }
            // 包装绘画工具
            window.drawALineLayerdrawALine = (pathsour) => {
                const paths = pathsour.steps
                const titles = pathsour.strategy
@@ -1000,19 +1005,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)