How to convert X/Y to lat/long

74926
5
Jump to solution
04-12-2013 06:46 AM
ShaningYu
Frequent Contributor
For a MapPoint, I get its X/Y coordinate values.  How can it be converted into lat/long values?  Thanks.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertBorchert
Frequent Contributor III
IF you already have it in ArcMap simply create a new x,y fields (lat long)  and use the right click on one of the new columns and select Calculate Geometry.

If you don't have it in ArcMap use the X,Y to create the features and then do the above.

For a MapPoint, I get its X/Y coordinate values.  How can it be converted into lat/long values?  Thanks.

View solution in original post

0 Kudos
5 Replies
AnthonyGiles
Frequent Contributor
Shaning,

It depends what coordinate system your application is in. If you are using web Mercator there is a class, see here:

http://resources.arcgis.com/en/help/flex-api/apiref/index.html?com/esri/ags/utils/WebMercatorUtil.ht...

If you are using anything else you will have to do the math yourself or use your geometry service.

Regards

Anthony
0 Kudos
Drew
by
Occasional Contributor III
For a MapPoint, I get its X/Y coordinate values.  How can it be converted into lat/long values?  Thanks.


If you are just looking to convert coordinates as a widget, I made one a little while ago.
You can download it here:
http://www.arcgis.com/home/item.html?id=edd4a2b7c722493a8b08f53eaa131e1e

If anything you can dig through it and use it as a code sample.

Drew
0 Kudos
RobertBorchert
Frequent Contributor III
IF you already have it in ArcMap simply create a new x,y fields (lat long)  and use the right click on one of the new columns and select Calculate Geometry.

If you don't have it in ArcMap use the X,Y to create the features and then do the above.

For a MapPoint, I get its X/Y coordinate values.  How can it be converted into lat/long values?  Thanks.
0 Kudos
ShaningYu
Frequent Contributor
Using the CoordinateMenu component and revising a couple of functions, I made conversion very well.  Thanks.
0 Kudos
omega_cancer
Occasional Contributor II
Call a simple function:

myMP=map.toMapFromStage(X,Y);
0 Kudos