AnsweredAssumed Answered

Transform  MapPoint to GCS

Question asked by bulla_b on Jul 31, 2017
Latest reply on Aug 2, 2017 by wkaiser-esristaff



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);


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.