Browse Source

绘制内容结算0206

zhiyuan-007 1 month ago
parent
commit
566f1a7caa
2 changed files with 19 additions and 4 deletions
  1. 17 3
      src/units/map/FlyGLTFEvent.js
  2. 2 1
      src/units/map/addDrawEvent.js

+ 17 - 3
src/units/map/FlyGLTFEvent.js

@@ -126,7 +126,7 @@ class FlyGLTFEvent{
                     currentAfterPosition[1] + offsetY,
                     currentAfterPosition[2] + 40
                 ];
-                this.view.camera = {
+                this.view.goTo({
                     position:{
                         x:mapPosition[0],
                         y:mapPosition[1],
@@ -136,7 +136,21 @@ class FlyGLTFEvent{
                     },
                     heading: heading,
                     tilt: 80
-                };
+                },{
+                    duration: 1000,
+                    easing: "linear"
+                })
+                // this.view.camera = {
+                //     position:{
+                //         x:mapPosition[0],
+                //         y:mapPosition[1],
+                //         z:mapPosition[2],
+                //         type:"point",
+                //         spatialReference:this.view.spatialReference
+                //     },
+                //     heading: heading,
+                //     tilt: 80
+                // };
             }
             bus_1.emit('SendMessage', {
                 action:"CurrentUavInfo",
@@ -146,7 +160,7 @@ class FlyGLTFEvent{
             })
 
 
-        }, 1);
+        }, 1000);
 
     }
     // 计算两个点之间的heading和tilt

+ 2 - 1
src/units/map/addDrawEvent.js

@@ -29,7 +29,8 @@ class AddDrawEvent {
                 enableRotation: false, // 禁用旋转
                 enableScaling: false,  // 禁用缩放
                 toggleToolOnClick:false,  //不允许切换
-                tool: "reshape"        // 设置默认工具为 reshape
+                tool: "reshape",        // 设置默认工具为 reshape
+                shapeOperation: "none",
             }
         });
     }