private void OnMouseMove(object sender, MouseEventArgs e) { var pt = view1.FindNearestPoint(e.GetPosition(view1)); if (pt.HasValue) { double lat, lon; FlightVisual3D.PointToLatLon(pt.Value, out lat, out lon); text2.Text = String.Format("Lat: {0:0.00} Lon: {1:0.00}", lat, lon); } }
private void AddFlight(Airport a, Airport b) { var from = FlightVisual3D.LatLonToPoint(a.Latitude, a.Longitude); var to = FlightVisual3D.LatLonToPoint(b.Latitude, b.Longitude); double lat, lon; FlightVisual3D.PointToLatLon(from, out lat, out lon); var ftv = new FlightVisual3D(from, to) { From = a.City, To = b.City }; view1.Children.Add(ftv); Flights.Add(ftv); }