From f7a638159ee7832d7a0e15365063933f3fc44ab7 Mon Sep 17 00:00:00 2001 From: xu Date: Wed, 29 Jan 2020 22:08:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Plane.FormationCreator/Views/MapView_CopterDrawing.cs | 9 ++++++--- Plane.FormationCreator/Views/View3D.xaml.cs | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Plane.FormationCreator/Views/MapView_CopterDrawing.cs b/Plane.FormationCreator/Views/MapView_CopterDrawing.cs index 0945f11..5649dc5 100644 --- a/Plane.FormationCreator/Views/MapView_CopterDrawing.cs +++ b/Plane.FormationCreator/Views/MapView_CopterDrawing.cs @@ -514,9 +514,12 @@ namespace Plane.FormationCreator.Views // var routePoint = Route.Points[1]; // routePoint.Lat = info.TargetLat; // routePoint.Lng = info.TargetLng; - Route.Points.RemoveAt(1); - Route.Points.Add(marker.Position); - this.Route.RegenerateShape(_map); + if (Route != null) + { + Route.Points.RemoveAt(1); + Route.Points.Add(marker.Position); + this.Route.RegenerateShape(_map); + } //routePoint.Altitude = info.TargetAlt; } break; diff --git a/Plane.FormationCreator/Views/View3D.xaml.cs b/Plane.FormationCreator/Views/View3D.xaml.cs index e752290..d75a117 100644 --- a/Plane.FormationCreator/Views/View3D.xaml.cs +++ b/Plane.FormationCreator/Views/View3D.xaml.cs @@ -32,8 +32,8 @@ namespace Plane.FormationCreator.Views InitializeComponent(); var camera = view3d.Camera as PerspectiveCamera; - camera.Position = new Point3D(0, 0, 0); - camera.LookDirection = new Vector3D(0, 1, 0); + camera.Position = new Point3D(0, 0, 1); + camera.LookDirection = new Vector3D(0,1,0);//new Vector3D(0, 1, 0); camera.UpDirection = new Vector3D(0, 0, 1); camera.FieldOfView = 120; _flightTaskManager = ServiceLocator.Current.GetInstance();