// 处理实时数据
        public void DealRealData(Model.RealData data)
        {
            var   position = new MapLngLat(data.Longitude, data.Latitude, data.Altitude);
            Plane plane    = CreateStateModel(data, position);

            trackMgr.AddTrackPoint(plane.Name, data.TargetType, position);

            if (!planeMgr.HasModel(plane))
            {
                if (CreatePlane(plane))
                {
                    planeMgr.AddModel(plane);
                }
            }
            else
            {
                planeMgr.UpdataModel(plane);
                UpdatePlanePosition(plane);

                if (trackMgr.IsShowTrack(plane.Name))
                {
                    UpdateTrackPoint(plane);
                }
            }

            // 目标跟踪
            if (trackPicture != null)
            {
                MapLngLat pos = trackPicture.GetLngLat();
                mapLogic.GetToolBox().ZoomToPosition(pos);
                EventPublisher.PublishJumpToGlobeViewEvent(this, new Model.JumpToGlobeViewEventArgs(trackPicture.ElementName, pos));
            }
        }
Beispiel #2
0
 // 跳转到三维
 private void 跳转到三维ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (prevPicture != null)
     {
         EventPublisher.PublishJumpToGlobeViewEvent(this, new Model.JumpToGlobeViewEventArgs(prevPicture.ElementName, prevPicture.GetLngLat()));
     }
 }