How do I find the geographic coordinates of the mouse when it is over the xamGeographicMap? I need to know when the user clicks on a specific ShapefileRecord. the xamGeographicMap.MouseLeftButtonDown doesn't return this information. If I can just get the coordinates of the mouse at the time, I can figure it out myself.
Thanks.
Hello RVassar,
Thank you for your post!
I have been looking into your question. You can get the mouse coordinates using the GetPosition method of the MouseButtonEventArgs from the PreviewMouseLeftButtonDown event. You can use the following line:
var mousePosition = e.GetPosition(this.GeoMap);
Also, I can suggest to take a look at our samples browser, that is installed on your computer together with our controls. In the section for the XamGeographicMap you would be able to find a sample, names "Map Crosshair", where it is shown, how to get Longitude, Latitude and X and Y coordinates.
Please do not hesitate to let me know if you have any further questions on this matter.
Hello Rvassar,
I am just checking if you have any further questions on this matter. Please do not hesitate to let me know if you do.