private void globeControl_OnMouseMove(object sender, IGlobeControlEvents_OnMouseMoveEvent e) { //get scale range in Kilometers IGlobeViewUtil globeCamera = globeControl.GlobeCamera as IGlobeViewUtil; double distanceInKM = globeCamera.ScalingDistance / 1000; Coordinates.Text = string.Format("{0} {1} {2}", "Distance: ", distanceInKM.ToString("######.##"), globeControl.Globe.GlobeUnits.ToString().Substring(4)); }
/// <summary> /// Mouse move event handler /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void axGlobeControl1_OnMouseMove(object sender, IGlobeControlEvents_OnMouseMoveEvent e) { double dLon, dLat, dAlt; //convert the window coordinate into geographic coordinates m_globeViewUtil.WindowToGeographic(m_globeControl.GlobeDisplay, m_globeControl.GlobeDisplay.ActiveViewer, e.x, e.y, true, out dLon, out dLat, out dAlt); //report the mouse geographic coordinate onto the statusbar statusBarXY.Text = string.Format("{0} {1} {2}", dLon.ToString("###.###"), dLat.ToString("###.###"), dAlt.ToString("###.###")); }
private void globeControl_OnMouseMove (object sender, IGlobeControlEvents_OnMouseMoveEvent e) { //get scale range in Kilometers IGlobeViewUtil globeCamera = globeControl.GlobeCamera as IGlobeViewUtil; double distanceInKM = globeCamera.ScalingDistance/1000; Coordinates.Text = string.Format("{0} {1} {2}", "Distance: ", distanceInKM.ToString("######.##"), globeControl.Globe.GlobeUnits.ToString().Substring(4)); }
void axGlobeControl_OnMouseMove(object sender, IGlobeControlEvents_OnMouseMoveEvent e) { }