0

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.

kdun0508
  • 75
  • 10

1 Answers1

0

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}");
}
dotMorten
  • 1,953
  • 1
  • 14
  • 10