liuyg
2021-06-15 d16c4f06f2699b18bfa3b449595868feec9f808b
Merge branch 'master' of http://192.168.0.105:10010/r/pyhmap
6 files modified
48 ■■■■■ changed files
widgets/FlyRoute/Widget.js 8 ●●●● patch | view | raw | blame | history
widgets/FlyRoute/Widget22.js 5 ●●●●● patch | view | raw | blame | history
widgets/FlyRoute/fly.js 31 ●●●● patch | view | raw | blame | history
widgets/HeatMap/CesiumHeatmap.js 1 ●●●● patch | view | raw | blame | history
widgets/SplitScreen/Widget.js 1 ●●●● patch | view | raw | blame | history
widgets/instructions/Widget.js 2 ●●●●● patch | view | raw | blame | history
widgets/FlyRoute/Widget.js
@@ -36,6 +36,10 @@
                    if (data.length == undefined) return;
                    // let datas = data.data;
                    self.allRoutes = data;
                    $("#flightRoute").empty();
                    $('#passPoint').empty();
                    // if (data.code == 200) {
                    for (var i = 0; i < data.length; i++) {
                        $("#flightRoute").append('<option value = ' + data[i].name + ' > ' + data[i].name + ' </option>');
@@ -101,7 +105,6 @@
                dataArr.push(data);
                liDom.on('click', data, function (event) {
                    console.log(event.data);
                });
                $('#passPoint').append(liDom);
@@ -152,7 +155,6 @@
                $('.jimu-widget-visualAngle .v-a-One').addClass('on').siblings().removeClass('on');
                self.flightTool.flyManager.stop();
                self.flightTool.RouteCollection.removeAllSites();
                $("#passPoint").empty();
            }
        },
@@ -206,7 +208,6 @@
        },
        _loadRoute: function _loadRoute(route) {
            console.log(route);
            var self = this;
            $("#passPoint").empty();
            self.flightTool.RouteCollection.AddRoute(route);
@@ -214,7 +215,6 @@
                var liStr = "<li class='item'>途径点" + (j + 1) + "</li>";
                var liDom = $(liStr);
                liDom.on('click', route[j], function (event) {
                    console.log(event.data);
                    var site = self.flightTool.RouteCollection.getSiteByIndex(event.data.id);
                    self.flightTool.flyManager.viewToSite(site);
                });
widgets/FlyRoute/Widget22.js
@@ -68,7 +68,6 @@
                    type: 'post',
                    dataType: 'JSON',
                    success: function (data) {
                        console.log(data);
                        self._loadRoute(data.data);
                    }
                })
@@ -120,7 +119,6 @@
                dataArr.push(data);
                liDom.on('click', data, function (event) {
                    console.log(event.data);
                });
                $('#passPoint').append(liDom);
@@ -180,7 +178,6 @@
                            "roll": Cesium.Math.toRadians(data.data[i].roll),
                            "time": data.data[i].time
                        };
                        console.log(site);
                        that.flightTool.allSites[i] = site;
                    }
                    that.flightTool.flyManager.play();
@@ -206,7 +203,6 @@
        },
        _loadRoute: function _loadRoute(route) {
            console.log(route);
            var self = this;
            $("#passPoint").empty();
            self.flightTool.RouteCollection.AddRoute(route);
@@ -214,7 +210,6 @@
                var liStr = "<li class='item'>途径点" + (j + 1) + "</li>";
                var liDom = $(liStr);
                liDom.on('click', route[j], function (event) {
                    console.log(event.data);
                    var site = self.flightTool.RouteCollection.getSiteByIndex(event.data.id);
                    self.flightTool.flyManager.viewToSite(site);
                });
widgets/FlyRoute/fly.js
@@ -11,6 +11,7 @@
        return false;
    }
}
function Fly_NZC(viewer){
    this.viewer=viewer;
    this.scene=viewer.scene;
@@ -47,9 +48,16 @@
            that.allSites=[];
            for (var i = 0; i < Route.length; i++) {
                let cartesian3 = Cesium.Cartesian3.fromDegrees(Route[i].lgtd, Route[i].lttd, Route[i].height);
                let site = {"ids":Route[i].id,"position_x":cartesian3.x,"position_y":cartesian3.y,"position_z":cartesian3.z,
                            "pitch":Cesium.Math.toRadians(Route[i].pitch),"heading":Cesium.Math.toRadians(Route[i].heading),
                            "roll":Cesium.Math.toRadians(Route[i].roll),"time":Route[i].time};
                let site = {
                    "ids": Route[i].id,
                    "position_x": cartesian3.x,
                    "position_y": cartesian3.y,
                    "position_z": cartesian3.z,
                    "pitch": Cesium.Math.toRadians(Route[i].pitch),
                    "heading": Cesium.Math.toRadians(Route[i].heading),
                    "roll": Cesium.Math.toRadians(Route[i].roll),
                    "time": Route[i].time
                };
                that.allSites[i]=site;
            }
            this.controlEntities();
@@ -66,9 +74,11 @@
        setVisible:function(mod,bool){
            if(mod===0){
                this.point_show=bool;
            }if(mod===1){
            }
            if (mod === 1) {
                this.line_show=bool;
            }if(mod===2){
            }
            if (mod === 2) {
                this.point_show=bool;
                this.line_show=bool;
            }
@@ -118,7 +128,6 @@
                    //添加到站点数组
                    that.allSites.push(Site);
                    this.controlEntities();
                    console.log(that.allSites);
                    return  true;
                }catch(e){
                    return  false;
@@ -302,8 +311,7 @@
            if(Math.abs(tem)>180){
                if(tem>=0){
                    tem = 360 - tem;
                }
                else{
                } else {
                    tem = 360 + tem;
                }
                h = Cesium.Math.toRadians(tem);
@@ -333,6 +341,8 @@
                    that.scene.screenSpaceCameraController.enableZoom = false;
                    that.scene.screenSpaceCameraController.enableTilt = false;
                    that.scene.screenSpaceCameraController.enableLook = false;
                 if(that.play_bool){
                    //设置初始点
                     that.scene.camera.setView({
@@ -343,7 +353,11 @@
                            roll : that.allSites[that.l].roll
                        }
                    });
                    if (that.setInterval_fly) {
                        clearInterval(that.setInterval_fly);
                    }
                    that.Interval();
                 }else{
                     //如果之前是暂停,继续飞行
                     that.scene.camera.setView({
@@ -355,6 +369,7 @@
                            roll : this.Site_pause.roll
                        }
                    });
                    that.Interval();
                 }
             }
widgets/HeatMap/CesiumHeatmap.js
@@ -359,7 +359,6 @@
        if (this._layer) {
            this._cesium.scene.imageryLayers.remove(this._layer);
        }
        console.log(CesiumHeatmap._getImageryProvider(this));
        this._layer = this._cesium.scene.imageryLayers.addImageryProvider(CesiumHeatmap._getImageryProvider(this));
    }
};
widgets/SplitScreen/Widget.js
@@ -119,7 +119,6 @@
            closeSplitScreen: function (item) {
                var that = this;
                console.log(item,this.name)
                if (item == this.name) {
                    if (this.flag = true) {
                        this.flag = false;
widgets/instructions/Widget.js
@@ -39,7 +39,6 @@
                }).then((res) => {
                    if (res.data.code == 200) {
                        var data = res.data.data;
                        // console.log(data, 99999);
                        that.beginLayuiDropdown(data)
@@ -82,7 +81,6 @@
                            $('.jimu-widget-instructions').find('.instructions-title').empty().append(str);
                            console.log(d, obj, 684)
                            for (var i = 0; i < d.length; i++) {
                                if (that['layer' + d[i].id]) {
                                    that.map.imageryLayers.remove(that['layer' + d[i].id]);