Select to view content in your preferred language

It's me, but the coordinate system is quite messy

665
3
09-03-2010 11:35 PM
MarioVernari
Emerging Contributor
Hi there.
It's probably me, but I'm quite confused about the coordinate system to use with the ArcGis API (under WPF).
By following your own samples (they're working perfectly in Silverlight) the coordinate system doesn't match when using an own WPF app. I.e. by running the "Interactive SDK::Mapping::Show mouse coords" sample in my browser (Silverlight 4), by moving the cursor on the map, I may see the pixel point and the "MapPoint" coords. The last one is expressed as longitude+latitude degree (-180..+180,-90..+90).
If I cut and paste the snippet on a brand new WPF application (ArcGis API 2), the MapPoint coords are totally different and I must use the Mercator conversion to sort me out.
What the right way?
Thanks in advance.
Mario
0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor
The 'ShowCoordinateBehavior' is using the map coordinates system.

If your map is using a geographical system, the coordinates will be longitude/latitude.
If your map is using a web mercator system, the coordinates will be in meters.

It should not be any differences between Silverlight and WPF. Likely you changed the base map layer and this explains the difference.
0 Kudos
YasunariTosa1
Emerging Contributor
Can ESRI provide the WebMercator to WGS84 (lat, lon) as an option for ShowCoordinateBehavior?
Getting meters in coordinates using USA map is completely useless.

Thank you.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
The ShowCoordiantesBehavior doesn't allow coordiantes projection.
But you can write your own control by wiring up the Map.MouseMove event and by projecting and displaying the coordinates in a popup window or in a specific control inside your application.
0 Kudos