Hi,
I'm converting some code from ArcObjects to ArcPro. The following bit of code is working. It converts a point clicked on by the user, to decimal degrees, but I'm sure there is a smoother way to do this.
var mousePoint = MapView.Active.ClientToMap(e.ClientPoint);
ToGeoCoordinateParameter ddParam = new ToGeoCoordinateParameter(GeoCoordinateType.DD);
string geoString = mousePoint.ToGeoCoordinateString(ddParam);
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(geoString);
string[] mapPoint = geoString.Split(' ');
mapPoint[0] = mapPoint[0].Remove(mapPoint[0].Length - 1); //the N
mapPoint[1] = "-" + mapPoint[1].Remove(mapPoint[1].Length - 1); //the W; use the '-' to change it from Easting
What would the proper way be to take mousePoint and convert/transform it to DD.
Thanks,