0
votes

I am new to working with the Arcgis Runtime SDK for UWP. I was wondering if anybody knewof a way to use the pointerpressed event handler to obtain the latitude and longitude coordinates of that click on the map.

1

1 Answers

0
votes

Yup you can use the ScreenToLocation method:

private void mapView_PointerPressed(object sender, PointerRoutedEventArgs e)
{
    MapPoint location = mapView.ScreenToLocation(e.GetCurrentPoint(mapView).Position);
    Debug.WriteLine($"You pressed at {location.X} , {location.Y}");
}