Merge branch 'master' of http://192.168.0.105:10010/r/pyhmap
| | |
| | | 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>'); |
| | |
| | | dataArr.push(data); |
| | | |
| | | liDom.on('click', data, function (event) { |
| | | console.log(event.data); |
| | | }); |
| | | |
| | | $('#passPoint').append(liDom); |
| | |
| | | $('.jimu-widget-visualAngle .v-a-One').addClass('on').siblings().removeClass('on'); |
| | | self.flightTool.flyManager.stop(); |
| | | self.flightTool.RouteCollection.removeAllSites(); |
| | | $("#passPoint").empty(); |
| | | } |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | _loadRoute: function _loadRoute(route) { |
| | | console.log(route); |
| | | var self = this; |
| | | $("#passPoint").empty(); |
| | | self.flightTool.RouteCollection.AddRoute(route); |
| | |
| | | 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); |
| | | }); |
| | |
| | | type: 'post', |
| | | dataType: 'JSON', |
| | | success: function (data) { |
| | | console.log(data); |
| | | self._loadRoute(data.data); |
| | | } |
| | | }) |
| | |
| | | dataArr.push(data); |
| | | |
| | | liDom.on('click', data, function (event) { |
| | | console.log(event.data); |
| | | }); |
| | | |
| | | $('#passPoint').append(liDom); |
| | |
| | | "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(); |
| | |
| | | }, |
| | | |
| | | _loadRoute: function _loadRoute(route) { |
| | | console.log(route); |
| | | var self = this; |
| | | $("#passPoint").empty(); |
| | | self.flightTool.RouteCollection.AddRoute(route); |
| | |
| | | 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); |
| | | }); |
| | |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | function Fly_NZC(viewer){ |
| | | this.viewer=viewer; |
| | | this.scene=viewer.scene; |
| | |
| | | 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(); |
| | |
| | | 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; |
| | | } |
| | |
| | | //添加到站点数组 |
| | | that.allSites.push(Site); |
| | | this.controlEntities(); |
| | | console.log(that.allSites); |
| | | return true; |
| | | }catch(e){ |
| | | return false; |
| | |
| | | if(Math.abs(tem)>180){ |
| | | if(tem>=0){ |
| | | tem = 360 - tem; |
| | | } |
| | | else{ |
| | | } else { |
| | | tem = 360 + tem; |
| | | } |
| | | h = Cesium.Math.toRadians(tem); |
| | |
| | | that.scene.screenSpaceCameraController.enableZoom = false; |
| | | that.scene.screenSpaceCameraController.enableTilt = false; |
| | | that.scene.screenSpaceCameraController.enableLook = false; |
| | | |
| | | |
| | | if(that.play_bool){ |
| | | //设置初始点 |
| | | that.scene.camera.setView({ |
| | |
| | | roll : that.allSites[that.l].roll |
| | | } |
| | | }); |
| | | if (that.setInterval_fly) { |
| | | clearInterval(that.setInterval_fly); |
| | | } |
| | | that.Interval(); |
| | | |
| | | }else{ |
| | | //如果之前是暂停,继续飞行 |
| | | that.scene.camera.setView({ |
| | |
| | | roll : this.Site_pause.roll |
| | | } |
| | | }); |
| | | |
| | | that.Interval(); |
| | | } |
| | | } |
| | |
| | | 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)); |
| | | } |
| | | }; |
| | |
| | | |
| | | closeSplitScreen: function (item) { |
| | | var that = this; |
| | | console.log(item,this.name) |
| | | if (item == this.name) { |
| | | if (this.flag = true) { |
| | | this.flag = false; |
| | |
| | | }).then((res) => { |
| | | if (res.data.code == 200) { |
| | | var data = res.data.data; |
| | | // console.log(data, 99999); |
| | | that.beginLayuiDropdown(data) |
| | | |
| | | |
| | |
| | | |
| | | $('.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]); |