shuishen
2022-03-31 20b361d432b649c135a2c26084e902d6eea14fa3
src/store/modules/mobile.js
@@ -2,49 +2,48 @@
import axios from 'axios'
import urlParameter from './mobiles/urlParameter'
window.popupsDom = null; // mobileDivForms的实体类
window.flytoPosition = null; // mobileDivForms的实体类
window.ellipsoid = null;
window.cartographic = null;
window.popupsDom = null // mobileDivForms的实体类
window.flytoPosition = null // mobileDivForms的实体类
window.ellipsoid = null
window.cartographic = null
window.useHeight = null;
window.vecLayer = null;
window.vecLayer = null;
window.pointLayer = null;
window.drawALineLayerMany = null; //活动线
window.drawALineLayerManycolor = null; //活动线颜色
window.drawALineLayerManyStyle = null; //活动线样式
window.drawALineLayerManypolyline = null; //活动线样式
window.drawAPointLayerMany = null; //活动点
window.drawAPointLayerManyposition = null; //活动点位置
window.drawAPointLayerManyLabels = null; //活动点
window.useHeight = null
window.vecLayer = null
window.vecLayer = null
window.pointLayer = null
window.drawALineLayerMany = null // 活动线
window.drawALineLayerManycolor = null // 活动线颜色
window.drawALineLayerManyStyle = null // 活动线样式
window.drawALineLayerManypolyline = null // 活动线样式
window.drawAPointLayerMany = null // 活动点
window.drawAPointLayerManyposition = null // 活动点位置
window.drawAPointLayerManyLabels = null // 活动点
// window.tilesetLayer = null;
// window.wallLayer = null;
window.areaLayer = null;
window.tileset = null;
window.drawALineLayer = null; // 导航路径图层
window.drawALineLayerGCJ02StartLngLat = null; // 导航路径图层转坐标
window.drawALineLayerGCJ02EndLngLat = null; // 导航路径图层转坐标
window.drawALineLayerdrawALine = null; // 导航路径画线方法
window.drawALineLayerIcon = null; // 导航路径图层图标
window.billboarddaohang = null; // 导航点
window.positiondaohang = null; // 导航点位置
window.polylinedaohang = null; // 导航线
window.polylinematerialdaohang = null; // 导航线属性
window.areaLayer = null
window.tileset = null
window.drawALineLayer = null // 导航路径图层
window.drawALineLayerGCJ02StartLngLat = null // 导航路径图层转坐标
window.drawALineLayerGCJ02EndLngLat = null // 导航路径图层转坐标
window.drawALineLayerdrawALine = null // 导航路径画线方法
window.drawALineLayerIcon = null // 导航路径图层图标
window.billboarddaohang = null // 导航点
window.positiondaohang = null // 导航点位置
window.polylinedaohang = null // 导航线
window.polylinematerialdaohang = null // 导航线属性
window.select = {
    // 绿色图层控制显示
    overlay: undefined,
    color: undefined
};
}
window.tancuanPosition = null;
window.tancuanPosition = null
// window.newLayer = null;
// window.usetowpointfive = null;
window.startPointFn = null;
window.startPointFn = null
const mobile = {
    state: {
        ...urlParameter.state, // url参数
@@ -301,50 +300,55 @@
                window.wallLayer.show = false // 打开瀑布
                window.startPointFn() // 移动默认视角
                window.areaLayer.show = true // 绿布
                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 {
                // if (state.zoomRange[3]) {
                //     global.viewer.imageryLayers.addImageryProvider(new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
                //         url: '/fz/{z}/{x}/{y}.png',
                //         fileExtension: 'png'
                //         // minimumLevel: 19
                //     }))
                //     // 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
                // 设置相机放大时的速率
@@ -359,7 +363,7 @@
        },
        // 绿布
        MSET_areaLayer(state, data) {
            window.areaLayer = data;
            window.areaLayer = data
        },
        // 切换控制
        MSET_PERSPECTIVECONTROL(state, data) {
@@ -490,9 +494,9 @@
                clas = [
                    data.from == 'PopupOurOnce' ? +data.lntLat[0] : +data.lntLat[0],
                    // data.from == 'PopupOurOnce' ? +data.lntLat[1] - 0.00108 : +data.lntLat[1],
                    data.from == 'PopupOurOnce' ?
                    +data.lntLat[1] - 0.00108 :
                    +data.lntLat[1] - 0.00048,
                    data.from == 'PopupOurOnce'
                        ? +data.lntLat[1] - 0.00108
                        : +data.lntLat[1] - 0.00048,
                    data.from == 'PopupOurOnce' ? 0 : 30.648862227
                ]
            } else if (state.dimension == '2.5D') {
@@ -512,7 +516,7 @@
                    data.from == 'PopupOurOnce' ? 0 : 0
                ]
            }
            window.tancuanPosition = data.position;
            window.tancuanPosition = data.position
            if (data.useJWD) {
                window.ellipsoid = global.viewer.scene.globe.ellipsoid
                window.cartographic = global.DC.Namespace.Cesium.Cartographic.fromDegrees(