From d16c4f06f2699b18bfa3b449595868feec9f808b Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 15 Jun 2021 17:52:56 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/pyhmap

---
 widgets/instructions/Widget.js   |    2 
 widgets/FlyRoute/Widget.js       |    8 
 widgets/FlyRoute/Widget22.js     |    5 
 widgets/SplitScreen/Widget.js    |    1 
 widgets/HeatMap/CesiumHeatmap.js |    1 
 widgets/FlyRoute/fly.js          |  817 +++++++++++++++++++++++++++++----------------------------
 6 files changed, 420 insertions(+), 414 deletions(-)

diff --git a/widgets/FlyRoute/Widget.js b/widgets/FlyRoute/Widget.js
index 73266ea..f46210a 100644
--- a/widgets/FlyRoute/Widget.js
+++ b/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);
 				});
diff --git a/widgets/FlyRoute/Widget22.js b/widgets/FlyRoute/Widget22.js
index 3062aa8..9f1a667 100644
--- a/widgets/FlyRoute/Widget22.js
+++ b/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);
                 });
diff --git a/widgets/FlyRoute/fly.js b/widgets/FlyRoute/fly.js
index eb3c9f8..513ed97 100644
--- a/widgets/FlyRoute/fly.js
+++ b/widgets/FlyRoute/fly.js
@@ -1,423 +1,438 @@
-function newSite(x,y,z,h,p,time,ids){
-	if(x!=null&&y!=null&&z!=null&&h!=null&&p!=null&&time!=null&&ids!=null){
-		this.position_x=x;
-		this.position_y=y;
-		this.position_z=z;
-		this.pitch=p;
-		this.heading=h;
-		this.time=time;
-		this.ids=ids;
-	}else{
+function newSite(x, y, z, h, p, time, ids) {
+	if (x != null && y != null && z != null && h != null && p != null && time != null && ids != null) {
+		this.position_x = x;
+		this.position_y = y;
+		this.position_z = z;
+		this.pitch = p;
+		this.heading = h;
+		this.time = time;
+		this.ids = ids;
+	} else {
 		return false;
 	}
 }
-function Fly_NZC(viewer){
-	this.viewer=viewer;
-	this.scene=viewer.scene;
-	this.entities=viewer.entities;
+
+function Fly_NZC(viewer) {
+	this.viewer = viewer;
+	this.scene = viewer.scene;
+	this.entities = viewer.entities;
 	//全部飞行站点数组
-	this.allSites=[];
-	var that =this;
-	this.checkIds=function(ids){
-        for(var i=0;i<that.allSites.length+1;i++){
-            if(i==that.allSites.length){
-                return false;
-            	break;
-            }
-	    	if(that.allSites[i].ids==ids){
-	    	    return i;
-	    	    break;
-	    	}
-	    }
-	};
-	this.RouteCollection={
-	 	//线颜色
-	 	//LineColor:Cesium.Color.WHITE,
-	 	//站点和路线显隐是否开启
-	    point_show:true,
-	    line_show:true,
-	 	//站点图片路径
-	 	img_path:"widgets/FlyRoute/images/location4.png",
-	 	 //飞行路线颜色
-	   /* setLineColor:function(){
-	    	Cesium.Color.WHITE,
-	    },*/
-	    AddRoute:function(Route){
-	    	this.deleteEntities();
-	    	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};
-	    		that.allSites[i]=site;
-	    	}
-            this.controlEntities();
-
-	    },
-	    //设置点图片
-	    setPointImg:function(path){
-	    	
-	    	this.img_path=path;
-	    	this.controlEntities();
-	        
-	    },
-	    //mod=0为设置点的可见,1为设置线的可见,2为控制点和线的可见
-	    setVisible:function(mod,bool){
-	        if(mod===0){
-		        this.point_show=bool;
-		    }if(mod===1){
-		        this.line_show=bool;
-		    }if(mod===2){
-		        this.point_show=bool;
-		        this.line_show=bool;
-		    }
-		    this.controlEntities();
-	    	
-	    },
-	    //通过传入站点类添加站点
-	    AddSite:function(newSite){
-	    	//判断id是否重复
-	    	var bool=that.checkIds(newSite.ids);
-	    	if(bool){
-                return  false;
-	    	}else{
-		    	var Site = {};
-			    Site.position_x=newSite.position_x;
-			    Site.position_y=newSite.position_y; 
-			    Site.position_z=newSite.position_z;
-			    Site.heading=newSite.heading;
-			    Site.pitch=newSite.pitch;
-			    //Site.roll=camera.roll;
-			    Site.time=newSite.time;
-			    Site.ids=newSite.ids;
-	            that.allSites.push(Site);
-	            this.controlEntities();
-	            return  true;
-	        }
-	    },
-	 	//添加当前视角为站点需要传入id
-	    AddSiteByView:function (ids) {
-	    	//判断id是否重复
-	    	var bool=that.checkIds(ids);
-	    	if(bool){
-                return  false;
-	    	}else{
-	    		try{
-		        	var position=that.scene.camera.position;
-			        //获取当前相机位置参数(飞行用)
-			    	var Site = {};
-			        Site.position_x=position.x;
-			        Site.position_y=position.y; 
-			        Site.position_z=position.z;
-			        Site.heading=that.scene.camera.heading;
-			        Site.pitch=that.scene.camera.pitch;
-			        Site.roll=that.scene.camera.roll;
-			        Site.time=3;
-			        Site.ids=ids;
-			        //添加到站点数组
-			        that.allSites.push(Site);
-			        this.controlEntities();
-			        console.log(that.allSites);
-			        return  true;
-			    }catch(e){
-			        return  false;
-			    }
-
-	    	}        
-	    },
-	    //根据索引获取站点信息
-	    getSiteByIndex:function (index) {
-	    	return that.allSites[index];
-	    },
-	    deleteEntities:function(){
-	    	//50000+为线id
-	    	for(var i=0;i<that.allSites.length;i++){
-	            that.entities.removeById(that.allSites[i].ids);
-	        }
-	        for(var i=1;i<500000;i++){
-	            var ids=parseInt(50000+i);
-	            var entities_del=that.entities.getById(ids);
-	            if(entities_del){
-	                    that.entities.remove(entities_del);
-	            }else{
-	                break;
-	            }
-		   
-	        }
-	    },
-	    controlEntities:function(){
-	    	var position_1,position_2,x1,x2,y1,y2,z1,z2,point_1_cartographic,point_2_cartographic;
-	    	//添加和删除站点,更改颜色或图片后,先清空entities,然后重新添加。
-	        this.deleteEntities();
-	        //添加显示的站点
-	       	var length=that.allSites.length;
-	       	if(this.point_show==true){
-	         	for(var j=0;j<length;j++){
-		            that.entities.add({
-		                position : new Cesium.Cartesian3(that.allSites[j].position_x,that.allSites[j].position_y,that.allSites[j].position_z),
-		                billboard :{
-		                    image :this.img_path,
-		                    width:30,
-		                    height:40,
-		                },
-		                //name : 10000+j,
-		                id:that.allSites[j].ids
-		            });
-		        }
-	       	}
-	       	//添加显示的线
-	       	if(this.line_show==true){
-	            for(var j=1;j<length;j++){
-	            	//将笛卡尔坐标转为经纬度坐标,用于绘制线
-	            	position_1=new Cesium.Cartesian3(that.allSites[j].position_x,that.allSites[j].position_y,that.allSites[j].position_z)
-		            point_1_cartographic = Cesium.Cartographic.fromCartesian(position_1);
-				    x1 = Cesium.Math.toDegrees(point_1_cartographic.longitude);
-				    y1 = Cesium.Math.toDegrees(point_1_cartographic.latitude);
-				    z1 = point_1_cartographic.height;
-
-				    position_2=new Cesium.Cartesian3(that.allSites[j-1].position_x,that.allSites[j-1].position_y,that.allSites[j-1].position_z)
-		            point_2_cartographic = Cesium.Cartographic.fromCartesian(position_2);
-				    x2 = Cesium.Math.toDegrees(point_2_cartographic.longitude);
-				    y2 = Cesium.Math.toDegrees(point_2_cartographic.latitude);
-				    z2 = point_2_cartographic.height;
-	                that.entities.add({
-	                  	id:50000+j,
-	                   // name : drowallStops.length,
-	                    polyline : {
-	                        positions : Cesium.Cartesian3.fromDegreesArrayHeights([x1,y1,z1,x2,y2,z2]),
-	                        width : 5,
-	                        material : Cesium.Color.WHITE
-	                    }
-	                });
-	                     
-	            }  
-	        }
-	       //如果关闭显示了站点和飞行路线,添加的新站点和飞行路线将先不显示
-	       if(this.line_show==false){
-	       	    for(var j=1;j<length;j++){
-	       	    	//将笛卡尔坐标转为经纬度坐标,用于绘制线
-	            	position_1=new Cesium.Cartesian3(that.allSites[j].position_x,that.allSites[j].position_y,that.allSites[j].position_z)
-		            point_1_cartographic = Cesium.Cartographic.fromCartesian(position_1);
-				    x1 = Cesium.Math.toDegrees(point_1_cartographic.longitude);
-				    y1 = Cesium.Math.toDegrees(point_1_cartographic.latitude);
-				    z1 = point_1_cartographic.height;
-
-				    position_2=new Cesium.Cartesian3(that.allSites[j-1].position_x,that.allSites[j-1].position_y,that.allSites[j-1].position_z)
-		            point_2_cartographic = Cesium.Cartographic.fromCartesian(position_2);
-				    x2 = Cesium.Math.toDegrees(point_2_cartographic.longitude);
-				    y2 = Cesium.Math.toDegrees(point_2_cartographic.latitude);
-				    z2 = point_2_cartographic.height;
-	                that.entities.add({
-	                  	id:50000+j,
-	                  	show:false,
-	                   // name : drowallStops.length,
-	                    polyline : {
-	                        positions : Cesium.Cartesian3.fromDegreesArrayHeights([x1,y1,z1,x2,y2,z2]),
-	                        width : 5,
-	                        material :  Cesium.Color.WHITE
-	                    }
-	                });
-	                     
-	            }  
-
-	       }
-	       if(this.point_show==false){
-	         	for(var j=0;j<length;j++){
-			       	that.entities.add({
-				        position : new Cesium.Cartesian3(that.allSites[j].position_x,that.allSites[j].position_y,that.allSites[j].position_z),
-				        billboard :{
-				            image :this.img_path,
-				            width:30,
-				            height:40,
-				        },
-				        show:false,
-				        //name : 10000+j,
-				        id:that.allSites[j].ids
-				    });
-				}   
-	        }
-	    },
-	    removeAllSites:function(){
-	    	this.deleteEntities();
-	    	that.allSites=[];
-	    	
-	    },
-	    removeSiteById:function(ids){
-	    	var id=that.checkIds(ids)
-	    	if(id){
-	    		this.deleteEntities();
-	    		that.allSites.splice(id,1);
-	    		this.controlEntities();
-	    	    
-	    	}else{
-	    		return false
-	    	}
-	    	
-	    }
-	  
-	 };
-	this.l=0;
-	this.b=0;
-	//用于判断执行的时暂停还是停止
-	this.play_bool=true;
-	var x,y,z,p,h;
-	this.setInterval_fly=null;
-    this.setcamera=function(){
-    	 //设置俯仰角
-    	   var set=that.allSites[that.l].time*50
-		    that.viewer.camera.setView({
-		        orientation: {
-		            heading :viewer.scene.camera.heading+h/set, 
-		            pitch :viewer.scene.camera.pitch+p/set,
-		            roll : 0.0                             
-		        }
-		    });
-		    //move移动相机
-		    that.viewer.camera.move(new Cesium.Cartesian3(x,y,z),1/set);
-			that.b--;
-		    if(that.b<=0){
-		    	that.l++;
-		        clearInterval(that.setInterval_fly);
-		        that.setInterval_fly=null;
-		        that.Interval();
-		       // that.b=0;
-		    }
-    };
-	this.Interval=function(){
-		var l=that.l;
-		if(that.play_bool){
-            that.b=that.allSites[l].time*50
-		}else{
-			that.play_bool=true;
+	this.allSites = [];
+	var that = this;
+	this.checkIds = function (ids) {
+		for (var i = 0; i < that.allSites.length + 1; i++) {
+			if (i == that.allSites.length) {
+				return false;
+				break;
+			}
+			if (that.allSites[i].ids == ids) {
+				return i;
+				break;
+			}
 		}
-	    if(that.allSites[l+1]){
-		    x=that.allSites[l+1].position_x-that.allSites[l].position_x;
-			y=that.allSites[l+1].position_y-that.allSites[l].position_y;
-			z=that.allSites[l+1].position_z-that.allSites[l].position_z;
-			p=that.allSites[l+1].pitch-that.allSites[l].pitch;
-			h=that.allSites[l+1].heading-that.allSites[l].heading;
-			
-			var tem = Cesium.Math.toDegrees(that.allSites[l+1].heading) - Cesium.Math.toDegrees(that.allSites[l].heading);
-			if(Math.abs(tem)>180){
-				if(tem>=0){
-					tem = 360 - tem;
+	};
+	this.RouteCollection = {
+		//线颜色
+		//LineColor:Cesium.Color.WHITE,
+		//站点和路线显隐是否开启
+		point_show: true,
+		line_show: true,
+		//站点图片路径
+		img_path: "widgets/FlyRoute/images/location4.png",
+		//飞行路线颜色
+		/* setLineColor:function(){
+		 	Cesium.Color.WHITE,
+		 },*/
+		AddRoute: function (Route) {
+			this.deleteEntities();
+			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
+				};
+				that.allSites[i] = site;
+			}
+			this.controlEntities();
+
+		},
+		//设置点图片
+		setPointImg: function (path) {
+
+			this.img_path = path;
+			this.controlEntities();
+
+		},
+		//mod=0为设置点的可见,1为设置线的可见,2为控制点和线的可见
+		setVisible: function (mod, bool) {
+			if (mod === 0) {
+				this.point_show = bool;
+			}
+			if (mod === 1) {
+				this.line_show = bool;
+			}
+			if (mod === 2) {
+				this.point_show = bool;
+				this.line_show = bool;
+			}
+			this.controlEntities();
+
+		},
+		//通过传入站点类添加站点
+		AddSite: function (newSite) {
+			//判断id是否重复
+			var bool = that.checkIds(newSite.ids);
+			if (bool) {
+				return false;
+			} else {
+				var Site = {};
+				Site.position_x = newSite.position_x;
+				Site.position_y = newSite.position_y;
+				Site.position_z = newSite.position_z;
+				Site.heading = newSite.heading;
+				Site.pitch = newSite.pitch;
+				//Site.roll=camera.roll;
+				Site.time = newSite.time;
+				Site.ids = newSite.ids;
+				that.allSites.push(Site);
+				this.controlEntities();
+				return true;
+			}
+		},
+		//添加当前视角为站点需要传入id
+		AddSiteByView: function (ids) {
+			//判断id是否重复
+			var bool = that.checkIds(ids);
+			if (bool) {
+				return false;
+			} else {
+				try {
+					var position = that.scene.camera.position;
+					//获取当前相机位置参数(飞行用)
+					var Site = {};
+					Site.position_x = position.x;
+					Site.position_y = position.y;
+					Site.position_z = position.z;
+					Site.heading = that.scene.camera.heading;
+					Site.pitch = that.scene.camera.pitch;
+					Site.roll = that.scene.camera.roll;
+					Site.time = 3;
+					Site.ids = ids;
+					//添加到站点数组
+					that.allSites.push(Site);
+					this.controlEntities();
+					return true;
+				} catch (e) {
+					return false;
 				}
-				else{
+
+			}
+		},
+		//根据索引获取站点信息
+		getSiteByIndex: function (index) {
+			return that.allSites[index];
+		},
+		deleteEntities: function () {
+			//50000+为线id
+			for (var i = 0; i < that.allSites.length; i++) {
+				that.entities.removeById(that.allSites[i].ids);
+			}
+			for (var i = 1; i < 500000; i++) {
+				var ids = parseInt(50000 + i);
+				var entities_del = that.entities.getById(ids);
+				if (entities_del) {
+					that.entities.remove(entities_del);
+				} else {
+					break;
+				}
+
+			}
+		},
+		controlEntities: function () {
+			var position_1, position_2, x1, x2, y1, y2, z1, z2, point_1_cartographic, point_2_cartographic;
+			//添加和删除站点,更改颜色或图片后,先清空entities,然后重新添加。
+			this.deleteEntities();
+			//添加显示的站点
+			var length = that.allSites.length;
+			if (this.point_show == true) {
+				for (var j = 0; j < length; j++) {
+					that.entities.add({
+						position: new Cesium.Cartesian3(that.allSites[j].position_x, that.allSites[j].position_y, that.allSites[j].position_z),
+						billboard: {
+							image: this.img_path,
+							width: 30,
+							height: 40,
+						},
+						//name : 10000+j,
+						id: that.allSites[j].ids
+					});
+				}
+			}
+			//添加显示的线
+			if (this.line_show == true) {
+				for (var j = 1; j < length; j++) {
+					//将笛卡尔坐标转为经纬度坐标,用于绘制线
+					position_1 = new Cesium.Cartesian3(that.allSites[j].position_x, that.allSites[j].position_y, that.allSites[j].position_z)
+					point_1_cartographic = Cesium.Cartographic.fromCartesian(position_1);
+					x1 = Cesium.Math.toDegrees(point_1_cartographic.longitude);
+					y1 = Cesium.Math.toDegrees(point_1_cartographic.latitude);
+					z1 = point_1_cartographic.height;
+
+					position_2 = new Cesium.Cartesian3(that.allSites[j - 1].position_x, that.allSites[j - 1].position_y, that.allSites[j - 1].position_z)
+					point_2_cartographic = Cesium.Cartographic.fromCartesian(position_2);
+					x2 = Cesium.Math.toDegrees(point_2_cartographic.longitude);
+					y2 = Cesium.Math.toDegrees(point_2_cartographic.latitude);
+					z2 = point_2_cartographic.height;
+					that.entities.add({
+						id: 50000 + j,
+						// name : drowallStops.length,
+						polyline: {
+							positions: Cesium.Cartesian3.fromDegreesArrayHeights([x1, y1, z1, x2, y2, z2]),
+							width: 5,
+							material: Cesium.Color.WHITE
+						}
+					});
+
+				}
+			}
+			//如果关闭显示了站点和飞行路线,添加的新站点和飞行路线将先不显示
+			if (this.line_show == false) {
+				for (var j = 1; j < length; j++) {
+					//将笛卡尔坐标转为经纬度坐标,用于绘制线
+					position_1 = new Cesium.Cartesian3(that.allSites[j].position_x, that.allSites[j].position_y, that.allSites[j].position_z)
+					point_1_cartographic = Cesium.Cartographic.fromCartesian(position_1);
+					x1 = Cesium.Math.toDegrees(point_1_cartographic.longitude);
+					y1 = Cesium.Math.toDegrees(point_1_cartographic.latitude);
+					z1 = point_1_cartographic.height;
+
+					position_2 = new Cesium.Cartesian3(that.allSites[j - 1].position_x, that.allSites[j - 1].position_y, that.allSites[j - 1].position_z)
+					point_2_cartographic = Cesium.Cartographic.fromCartesian(position_2);
+					x2 = Cesium.Math.toDegrees(point_2_cartographic.longitude);
+					y2 = Cesium.Math.toDegrees(point_2_cartographic.latitude);
+					z2 = point_2_cartographic.height;
+					that.entities.add({
+						id: 50000 + j,
+						show: false,
+						// name : drowallStops.length,
+						polyline: {
+							positions: Cesium.Cartesian3.fromDegreesArrayHeights([x1, y1, z1, x2, y2, z2]),
+							width: 5,
+							material: Cesium.Color.WHITE
+						}
+					});
+
+				}
+
+			}
+			if (this.point_show == false) {
+				for (var j = 0; j < length; j++) {
+					that.entities.add({
+						position: new Cesium.Cartesian3(that.allSites[j].position_x, that.allSites[j].position_y, that.allSites[j].position_z),
+						billboard: {
+							image: this.img_path,
+							width: 30,
+							height: 40,
+						},
+						show: false,
+						//name : 10000+j,
+						id: that.allSites[j].ids
+					});
+				}
+			}
+		},
+		removeAllSites: function () {
+			this.deleteEntities();
+			that.allSites = [];
+
+		},
+		removeSiteById: function (ids) {
+			var id = that.checkIds(ids)
+			if (id) {
+				this.deleteEntities();
+				that.allSites.splice(id, 1);
+				this.controlEntities();
+
+			} else {
+				return false
+			}
+
+		}
+
+	};
+	this.l = 0;
+	this.b = 0;
+	//用于判断执行的时暂停还是停止
+	this.play_bool = true;
+	var x, y, z, p, h;
+	this.setInterval_fly = null;
+	this.setcamera = function () {
+		//设置俯仰角
+		var set = that.allSites[that.l].time * 50
+		that.viewer.camera.setView({
+			orientation: {
+				heading: viewer.scene.camera.heading + h / set,
+				pitch: viewer.scene.camera.pitch + p / set,
+				roll: 0.0
+			}
+		});
+		//move移动相机
+		that.viewer.camera.move(new Cesium.Cartesian3(x, y, z), 1 / set);
+		that.b--;
+		if (that.b <= 0) {
+			that.l++;
+			clearInterval(that.setInterval_fly);
+			that.setInterval_fly = null;
+			that.Interval();
+			// that.b=0;
+		}
+	};
+	this.Interval = function () {
+		var l = that.l;
+		if (that.play_bool) {
+			that.b = that.allSites[l].time * 50
+		} else {
+			that.play_bool = true;
+		}
+		if (that.allSites[l + 1]) {
+			x = that.allSites[l + 1].position_x - that.allSites[l].position_x;
+			y = that.allSites[l + 1].position_y - that.allSites[l].position_y;
+			z = that.allSites[l + 1].position_z - that.allSites[l].position_z;
+			p = that.allSites[l + 1].pitch - that.allSites[l].pitch;
+			h = that.allSites[l + 1].heading - that.allSites[l].heading;
+
+			var tem = Cesium.Math.toDegrees(that.allSites[l + 1].heading) - Cesium.Math.toDegrees(that.allSites[l].heading);
+			if (Math.abs(tem) > 180) {
+				if (tem >= 0) {
+					tem = 360 - tem;
+				} else {
 					tem = 360 + tem;
 				}
 				h = Cesium.Math.toRadians(tem);
 			}
 			//that.b=that.allSites[l].time*20
-		    that.setInterval_fly=setInterval(that.setcamera,20);
-		}else{
-			that.play_bool=true;
-			that.l=0;
+			that.setInterval_fly = setInterval(that.setcamera, 20);
+		} else {
+			that.play_bool = true;
+			that.l = 0;
 			that.scene.screenSpaceCameraController.enableRotate = true;
-	        that.scene.screenSpaceCameraController.enableTranslate = true;
-	        that.scene.screenSpaceCameraController.enableZoom = true;
-	        that.scene.screenSpaceCameraController.enableTilt = true;
-	        that.scene.screenSpaceCameraController.enableLook = true;
+			that.scene.screenSpaceCameraController.enableTranslate = true;
+			that.scene.screenSpaceCameraController.enableZoom = true;
+			that.scene.screenSpaceCameraController.enableTilt = true;
+			that.scene.screenSpaceCameraController.enableLook = true;
 		}
-			
+
 	};
 
-	this.flyManager={
+	this.flyManager = {
 		//用于储存暂停时的位置
-		Site_pause:{},
-	 	play:function(){
-	 		//如果之前点的时停止重新开始飞行
-	 		if(that.allSites.length>1){
-		 			that.scene.screenSpaceCameraController.enableRotate = false;
-	                that.scene.screenSpaceCameraController.enableTranslate = false;
-	                that.scene.screenSpaceCameraController.enableZoom = false;
-	                that.scene.screenSpaceCameraController.enableTilt = false;
-	                that.scene.screenSpaceCameraController.enableLook = false;
-	 		    if(that.play_bool){
-	                //设置初始点
-	                 that.scene.camera.setView({
-	                    destination : new Cesium.Cartesian3(that.allSites[that.l].position_x,that.allSites[that.l].position_y,that.allSites[that.l].position_z),
-	                    orientation : {
-	                        heading : that.allSites[that.l].heading,
-	                        pitch : that.allSites[that.l].pitch,
-	                        roll : that.allSites[that.l].roll
-	                    }
-	                });
-	                that.Interval();
-	 		    }else{
-		 			//如果之前是暂停,继续飞行
-		 			that.scene.camera.setView({
-		                    //将经度、纬度、高度的坐标转换为笛卡尔坐标
-		               destination : new Cesium.Cartesian3(this.Site_pause.position_x,this.Site_pause.position_y,this.Site_pause.position_z),
-		               orientation : {
-		                    heading : this.Site_pause.heading,
-		                    pitch : this.Site_pause.pitch,
-		                    roll : this.Site_pause.roll
-		                }
-		            });
-		            that.Interval();
-	 		    }
-	 	    }
-	 		
-	 	},
-	    stop:function(){
-	    	if( that.setInterval_fly!=null){
-	    		clearInterval(that.setInterval_fly);
-		        that.setInterval_fly=null;
-	    	}
-	    	that.l=0;
-		    that.play_bool=true;
-		    that.scene.screenSpaceCameraController.enableRotate = true;
-	        that.scene.screenSpaceCameraController.enableTranslate = true;
-	        that.scene.screenSpaceCameraController.enableZoom = true;
-	        that.scene.screenSpaceCameraController.enableTilt = true;
-	        that.scene.screenSpaceCameraController.enableLook = true;
-	    },
-	    pause:function(){
-    
-	    	if( that.setInterval_fly!=null){
-	    		clearInterval(that.setInterval_fly);
-		        that.setInterval_fly=null;
-		        that.play_bool=false;
-	    	}
-	    	//获取暂停时的camera数据
-	    	var position=that.scene.camera.position;
-		    this.Site_pause.position_x=position.x;
-		    this.Site_pause.position_y=position.y; 
-		    this.Site_pause.position_z=position.z;
-		    this.Site_pause.heading=that.scene.camera.heading;
-		    this.Site_pause.pitch=that.scene.camera.pitch;
-		    this.Site_pause.roll=that.scene.camera.roll;
-	    	
+		Site_pause: {},
+		play: function () {
+			//如果之前点的时停止重新开始飞行
+			if (that.allSites.length > 1) {
+				that.scene.screenSpaceCameraController.enableRotate = false;
+				that.scene.screenSpaceCameraController.enableTranslate = false;
+				that.scene.screenSpaceCameraController.enableZoom = false;
+				that.scene.screenSpaceCameraController.enableTilt = false;
+				that.scene.screenSpaceCameraController.enableLook = false;
 
-	    	that.scene.screenSpaceCameraController.enableRotate = true;
-	        that.scene.screenSpaceCameraController.enableTranslate = true;
-	        that.scene.screenSpaceCameraController.enableZoom = true;
-	        that.scene.screenSpaceCameraController.enableTilt = true;
-	        that.scene.screenSpaceCameraController.enableLook = true;
 
-	    },
-	    SetStartSite:function(ids){
-	    	var bool=that.checkIds(ids);
-	    	if(bool){
-                that.l=bool;
-                return true;
-	    	}else{
-	    		return false;
-	    	}
+				if (that.play_bool) {
+					//设置初始点
+					that.scene.camera.setView({
+						destination: new Cesium.Cartesian3(that.allSites[that.l].position_x, that.allSites[that.l].position_y, that.allSites[that.l].position_z),
+						orientation: {
+							heading: that.allSites[that.l].heading,
+							pitch: that.allSites[that.l].pitch,
+							roll: that.allSites[that.l].roll
+						}
+					});
+					if (that.setInterval_fly) {
+						clearInterval(that.setInterval_fly);
+					}
+					that.Interval();
 
-	    },
-	    viewToSite:function(site){
-	    	that.scene.camera.setView({
-	           destination : new Cesium.Cartesian3(site.position_x,site.position_y,site.position_z),
-	           orientation : {
-	               heading : site.heading,
-	               pitch : site.pitch,
-	               roll : site.roll
-	            }
-	      	}); 
+				} else {
+					//如果之前是暂停,继续飞行
+					that.scene.camera.setView({
+						//将经度、纬度、高度的坐标转换为笛卡尔坐标
+						destination: new Cesium.Cartesian3(this.Site_pause.position_x, this.Site_pause.position_y, this.Site_pause.position_z),
+						orientation: {
+							heading: this.Site_pause.heading,
+							pitch: this.Site_pause.pitch,
+							roll: this.Site_pause.roll
+						}
+					});
 
-	    }
+					that.Interval();
+				}
+			}
+
+		},
+		stop: function () {
+			if (that.setInterval_fly != null) {
+				clearInterval(that.setInterval_fly);
+				that.setInterval_fly = null;
+			}
+			that.l = 0;
+			that.play_bool = true;
+			that.scene.screenSpaceCameraController.enableRotate = true;
+			that.scene.screenSpaceCameraController.enableTranslate = true;
+			that.scene.screenSpaceCameraController.enableZoom = true;
+			that.scene.screenSpaceCameraController.enableTilt = true;
+			that.scene.screenSpaceCameraController.enableLook = true;
+		},
+		pause: function () {
+
+			if (that.setInterval_fly != null) {
+				clearInterval(that.setInterval_fly);
+				that.setInterval_fly = null;
+				that.play_bool = false;
+			}
+			//获取暂停时的camera数据
+			var position = that.scene.camera.position;
+			this.Site_pause.position_x = position.x;
+			this.Site_pause.position_y = position.y;
+			this.Site_pause.position_z = position.z;
+			this.Site_pause.heading = that.scene.camera.heading;
+			this.Site_pause.pitch = that.scene.camera.pitch;
+			this.Site_pause.roll = that.scene.camera.roll;
+
+
+			that.scene.screenSpaceCameraController.enableRotate = true;
+			that.scene.screenSpaceCameraController.enableTranslate = true;
+			that.scene.screenSpaceCameraController.enableZoom = true;
+			that.scene.screenSpaceCameraController.enableTilt = true;
+			that.scene.screenSpaceCameraController.enableLook = true;
+
+		},
+		SetStartSite: function (ids) {
+			var bool = that.checkIds(ids);
+			if (bool) {
+				that.l = bool;
+				return true;
+			} else {
+				return false;
+			}
+
+		},
+		viewToSite: function (site) {
+			that.scene.camera.setView({
+				destination: new Cesium.Cartesian3(site.position_x, site.position_y, site.position_z),
+				orientation: {
+					heading: site.heading,
+					pitch: site.pitch,
+					roll: site.roll
+				}
+			});
+
+		}
 
 	};
-}
+}
\ No newline at end of file
diff --git a/widgets/HeatMap/CesiumHeatmap.js b/widgets/HeatMap/CesiumHeatmap.js
index fd25b24..ea99831 100644
--- a/widgets/HeatMap/CesiumHeatmap.js
+++ b/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));
 	}
 };
diff --git a/widgets/SplitScreen/Widget.js b/widgets/SplitScreen/Widget.js
index a850bbb..8769b89 100644
--- a/widgets/SplitScreen/Widget.js
+++ b/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;
diff --git a/widgets/instructions/Widget.js b/widgets/instructions/Widget.js
index 034a3f0..1879a54 100644
--- a/widgets/instructions/Widget.js
+++ b/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]);

--
Gitblit v1.9.3