cdb1e393 by jikai

111111

1 parent c1cc48da
...@@ -54,5 +54,6 @@ export default class heightControl { ...@@ -54,5 +54,6 @@ export default class heightControl {
54 } 54 }
55 remove() { 55 remove() {
56 objectManage.viewer.entities.removeAll(); 56 objectManage.viewer.entities.removeAll();
57 this.splice(1000);
57 } 58 }
58 } 59 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -132,7 +132,7 @@ export default class shadow { ...@@ -132,7 +132,7 @@ export default class shadow {
132 extend : 20 132 extend : 20
133 }); 133 });
134 } 134 }
135 }, 20); 135 }, 500);
136 } 136 }
137 clear() { 137 clear() {
138 this.handlerPolygon.deactivate(); 138 this.handlerPolygon.deactivate();
...@@ -146,4 +146,10 @@ export default class shadow { ...@@ -146,4 +146,10 @@ export default class shadow {
146 extend : 0 146 extend : 0
147 }); 147 });
148 } 148 }
149 remove() {
150 this.points = [];
151 this.shadowQuery.destroy();
152 this.shadowQuery = new Cesium.ShadowQueryPoints(objectManage.viewer.scene);
153 this.shadowQuery.build();
154 }
149 } 155 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -87,13 +87,6 @@ ...@@ -87,13 +87,6 @@
87 components: {}, 87 components: {},
88 data() { 88 data() {
89 return { 89 return {
90 // isCF: true, // 春分
91 // isXZ: false, // 夏至
92 // isQF: false, // 秋分
93 // isLD: false, // 立冬
94 // isDZ: false, // 冬至
95 // keepTqArr: ['isCF', 'isXZ', 'isQF', 'isLD', 'isDZ'],
96
97 anslysisTime: '', 90 anslysisTime: '',
98 timeS: 30, // 时间间隔 91 timeS: 30, // 时间间隔
99 time: 0 * 60 * 60 * 1000, // 滑块时间 92 time: 0 * 60 * 60 * 1000, // 滑块时间
...@@ -101,12 +94,6 @@ ...@@ -101,12 +94,6 @@
101 marks: { 94 marks: {
102 0: '0:00', 95 0: '0:00',
103 [maxW]: '23:59', 96 [maxW]: '23:59',
104 // 50: {
105 // style: {
106 // color: '#1989FA'
107 // },
108 // label: this.$createElement('strong', '50%')
109 // }
110 }, 97 },
111 pickerOptions: { // 时间选择器 时间范围限制 98 pickerOptions: { // 时间选择器 时间范围限制
112 selectableRange: '00:00:00 - 23:59:59' 99 selectableRange: '00:00:00 - 23:59:59'
...@@ -133,7 +120,7 @@ ...@@ -133,7 +120,7 @@
133 this.shadow.sunlight(); 120 this.shadow.sunlight();
134 }, 121 },
135 stopAnalysis() { 122 stopAnalysis() {
136 123 this.shadow.remove();
137 }, 124 },
138 handleIsXmbj(val) { 125 handleIsXmbj(val) {
139 let self = this; 126 let self = this;
......
...@@ -167,6 +167,7 @@ ...@@ -167,6 +167,7 @@
167 data() { 167 data() {
168 return { 168 return {
169 viewer: undefined, 169 viewer: undefined,
170 flyCircle: false,
170 isRoller: false, 171 isRoller: false,
171 isReturn: false, // 复位 172 isReturn: false, // 复位
172 enlarge: false, // 放大 173 enlarge: false, // 放大
...@@ -226,8 +227,9 @@ ...@@ -226,8 +227,9 @@
226 objectManage.viewer = this.viewer; 227 objectManage.viewer = this.viewer;
227 // layers[0].selectEnabled = false; 228 // layers[0].selectEnabled = false;
228 // layers[1].selectEnabled = false; 229 // layers[1].selectEnabled = false;
229 // layers[0].shadowType = 2; 230 console.log(layers);
230 // layers[1].shadowType = 2; 231 layers[1].shadowType = 2;
232 layers[2].shadowType = 2;
231 scene.camera.setView({ 233 scene.camera.setView({
232 destination : Cesium.Cartesian3.fromDegrees(116.44621857300415, 39.899281526734555, 216.7793905027196), 234 destination : Cesium.Cartesian3.fromDegrees(116.44621857300415, 39.899281526734555, 216.7793905027196),
233 orientation : { 235 orientation : {
...@@ -270,10 +272,12 @@ ...@@ -270,10 +272,12 @@
270 this.commons.log(flag) 272 this.commons.log(flag)
271 }, 273 },
272 isClear(flag) { 274 isClear(flag) {
273 /** 275 // this.commons.log(flag)
274 * @param {*} flag 'true 选中清除, falss 反之' 276 this.draw.handlerDis.clear();
275 */ 277 this.draw.handlerArea.clear();
276 this.commons.log(flag) 278 this.draw.handlerHeight.clear();
279 this.viewer.scene.layers.find("build1").clearCustomClipBox();
280 this.viewer.scene.layers.find("build2").clearCustomClipBox();
277 } 281 }
278 282
279 // rightFunc 283 // rightFunc
...@@ -314,12 +318,40 @@ ...@@ -314,12 +318,40 @@
314 this.viewer.scene.multiViewportMode = Cesium.MultiViewportMode.HORIZONTAL; 318 this.viewer.scene.multiViewportMode = Cesium.MultiViewportMode.HORIZONTAL;
315 } 319 }
316 // 指北 320 // 指北
317 ,EtoNorth() {} 321 ,EtoNorth() {
322 var handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);
323 handler.setInputAction(evt => {
324 var cartesian = this.viewer.scene.pickPosition(evt.position);
325 var boxOption = {
326 dimensions: new Cesium.Cartesian3(10, 10, 10),
327 position: cartesian,
328 clipMode: 'only_keep_line',
329 heading: 0
330 };
331 this.viewer.scene.layers.find("build1").setCustomClipBox(boxOption);
332 this.viewer.scene.layers.find("build2").setCustomClipBox(boxOption);
333 }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
334 }
318 // 顶视 335 // 顶视
319 ,EtopSee() {} 336 ,EtopSee() {
337 this.viewer.camera.flyTo({
338 destination : Cesium.Cartesian3.fromDegrees(116.45821857300415, 39.915281526734555, 5000.0)
339 });
340 }
320 // 环视 341 // 环视
321 ,EroundSee() { 342 ,EroundSee() {
322 343 // this.viewer.camera.flyCircleLoop = !!this.viewer.camera.flyCircleLoop;
344 // var handlerPoint = new Cesium.DrawHandler(this.viewer, Cesium.DrawMode.Point);
345 // handlerPoint.drawEvt.addEventListener(result => {
346 // // console.log(result.object._position);
347 // // {x: -2179734.991212225, y: 4379799.834213645, z: 4092420.9926270735}
348 // this.viewer.camera.flyCircle({x: -2179734.991212225, y: 4379799.834213645, z: 4092420.9926270735});
349 // });
350 // handlerPoint.deactivate();
351 // handlerPoint.activate();
352 (this.flyCircle = !this.flyCircle) ?
353 this.viewer.camera.flyCircle({x: -2179734.991212225, y: 4379799.834213645, z: 4092420.9926270735}) :
354 this.viewer.camera.stopFlyCircle();
323 } 355 }
324 // 视域 356 // 视域
325 ,Ehorizon(val) { 357 ,Ehorizon(val) {
......