DESKTOP-CRQ4N2U\jintian 2 жил өмнө
parent
commit
a1aa4c02dd

+ 10 - 9
src/views/Map3d/components/coordsTool.vue

@@ -105,10 +105,10 @@
 			 */
 			pickUp() {
 				let _self = this;
-				
+
 				//移除左键单击事件
 				if (jt3d.handlerLeftClick) {
-					jt3d.handlerLeftClick.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK); 
+					jt3d.handlerLeftClick.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
 				}
 
 				jt3d.CommonTools._sketchViewModel._lineLabel = _self.pickCoordsLable.toString();
@@ -117,7 +117,7 @@
 						_self.pickCoordsArray.push(gPoint.lng.toFixed(6) + ',' + gPoint.lat.toFixed(6) + ',' + gPoint.height.toFixed(2)) + ";";
 						_self.pickCoords = _self.pickCoordsArray.join(";\n");
 						_self.pickCoordsLable++;
-						
+
 						//还原左键单击事件
 						_self.$parent.$parent.$refs.refMap3d.clickEntity(jt3d);
 					},
@@ -263,15 +263,16 @@
 			flyToEntity(entity) {
 				let flyToEntity = jt3d.LocateUtil.flyToEntity(entity, {
 					duration: 3,
-					heading: 0,
-					pitch: -60,
-					range: 0
+					heading: 200,
+					pitch: -80,
+					range: 1000
 				});
-				flyToEntity.then(function(entity11) {
-					// alert(1111)
+				flyToEntity.then(function(entity) {
+					if (entity.point) {
+						jt3d._viewer.entities.remove(entity);
+					}
 				});
 			},
-
 		},
 
 		mounted() {