Have anyone converted a xy coordinate to lat/long using Pro SDK? I just could not get the correct numbers.
Hi Fayu,
You can use this code snippet:
return QueuedTask.Run(() => {
var activeMapView = MapView.Active;
MapPoint zoomToPnt = MapPointBuilder.CreateMapPoint(coord.Longitude, coord.Latitude, SpatialReferences.WGS84);
var projectedXY = GeometryEngine.Instance.Project (zoomToPnt, activeMapView.Map.SpatialReference) as MapPoint;
});
There are multiple samples among the community samples that use projection, just search for "Instance.Project" on the community samples GitHub repo for a list of usages.