I have a WPF application using ArcGIS 10. In the application I can set two point by clicking on map and calculate route between them. every time I click on the map, The application creates a GraphicsLayer and a Graphic element using this code:

GraphicsLayer stopsGraphicsLayer = myMap.Layers["myStops"] as GraphicsLayer;
Graphic stop = new Graphic() [Geometry = e.MapPoint };

My question:

I need to get the XY Coordinates of the points clicked on the maps. Does anybody know what elements\attributes\methods to get this information? Thanks.

1 Answer 1


I found the answer (I've been looking for it a week): the coordinates are part of the geometry attribute.

The code I added to get the coordinates of the stop is this:

ESRI.ArcGIS.Client.Geometry.Geometry whats = stop.Geometry;

This returns a type saying somthing like "Point[x=456543.34,y=456234.23,WKID=2045]"

and if I want to do anything with it, I can record it as a string, split it as I want and parse it to an int.

Thanks again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.