Arcgis UWP 从指针按下事件获取地理位置

Arcgis UWP Obtain geolocation from pointerpressed event

我刚开始使用适用于 UWP 的 Arcgis Runtime SDK。我想知道是否有人知道使用 pointerpressed 事件处理程序来获取地图上单击的纬度和经度坐标的方法。

是的,您可以使用 ScreenToLocation 方法:

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}");
}