| | |
| | | break; |
| | | } |
| | | } |
| | | img_path |
| | | }; |
| | | this.RouteCollection = { |
| | | //线颜色 |
| | |
| | | }; |
| | | |
| | | this.flyManager = { |
| | | img_path: "widgets/FlyRoute/images/location4.png", |
| | | //用于储存暂停时的位置 |
| | | Site_pause: {}, |
| | | play: function () { |
| | | |
| | | for (var i = 0; i < that.allSites.length; i++) { |
| | | that.entities.removeById(that.allSites[i].ids); |
| | | } |
| | | |
| | | //如果之前点的时停止重新开始飞行 |
| | | if (that.allSites.length > 1) { |
| | | that.scene.screenSpaceCameraController.enableRotate = false; |
| | |
| | | |
| | | }, |
| | | stop: function () { |
| | | //添加显示的站点 |
| | | var length = that.allSites.length; |
| | | for (var j = 0; j < length; j++) { |
| | | var flag = false; |
| | | for (var i = 0; i < that.entities.values.length; i++) { |
| | | if (that.allSites[j].ids == that.entities.values[i].id) { |
| | | flag = true |
| | | } |
| | | } |
| | | if (flag == false) { |
| | | 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 (that.setInterval_fly != null) { |
| | | clearInterval(that.setInterval_fly); |
| | | that.setInterval_fly = null; |
| | |
| | | that.scene.screenSpaceCameraController.enableLook = true; |
| | | }, |
| | | pause: function () { |
| | | |
| | | //添加显示的站点 |
| | | var length = that.allSites.length; |
| | | for (var j = 0; j < length; j++) { |
| | | var flag = false; |
| | | for (var i = 0; i < that.entities.values.length; i++) { |
| | | if (that.allSites[j].ids == that.entities.values[i].id) { |
| | | flag = true |
| | | } |
| | | } |
| | | if (flag == false) { |
| | | 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 (that.setInterval_fly != null) { |
| | | clearInterval(that.setInterval_fly); |
| | | that.setInterval_fly = null; |