Ejemplo n.º 1
0
        private void mapCtl_GeoRef_MouseClick(object sender, MouseEventArgs e)
        {
            Map.GeomCoordinate coord = mapCtl_GeoRef.CursorCoordinate;

            string Lat = txtLat.Text = coord.Latitude.ToString();
            string Lon = txtLon.Text = coord.Longitude.ToString();

            if (rbTL.Checked)
            {
                Lat_TL.Text = Lat;
                Lon_TL.Text = Lon;
                if (rb4Pt_AffineRotation.Checked)
                {
                    rbBL.Checked = true;
                }
                else
                {
                    rbBR.Checked = true;
                }
                return;
            }

            if (rbBL.Checked)
            {
                Lat_BL.Text = Lat;
                Lon_BL.Text = Lon;
                if (rb4Pt_AffineRotation.Checked)
                {
                    rbTR.Checked = true;
                }
                else
                {
                    rbBR.Checked = true;
                }
                return;
            }

            if (rbTR.Checked)
            {
                Lat_TR.Text  = Lat;
                Lon_TR.Text  = Lon;
                rbBR.Checked = true;
                return;
            }

            if (rbBR.Checked)
            {
                Lat_BR.Text  = Lat;
                Lon_BR.Text  = Lon;
                rbBR.Checked = true;
                return;
            }
        }
Ejemplo n.º 2
0
 private void mapCtl_GeoRef_MouseMove(object sender, MouseEventArgs e)
 {
     Map.GeomCoordinate coord = mapCtl_GeoRef.CursorCoordinate;
     try
     {
         txtLat.Text = coord.Latitude.ToString();
         txtLon.Text = coord.Longitude.ToString();
     }
     catch
     {
         //Shutting down
     }
 }