ArcGIS Pro Tool,单击显示坐标
protected override Task HandleMouseDownAsync(MapViewMouseButtonEventArgs e) { //Get the instance of the ViewModel var vm = OverlayEmbeddableControl as BasicEmbeddableControlViewModel; if (vm == null) return Task.FromResult(0); //Get the map coordinates from the click point and set the property on the ViewModel. return QueuedTask.Run(() => { var mapPoint = MapView.Active.ClientToMap(e.ClientPoint); var sb = new StringBuilder(); sb.AppendLine(string.Format("X: {0}", mapPoint.X)); sb.Append(string.Format("Y: {0}", mapPoint.Y)); if (mapPoint.HasZ) { sb.AppendLine(); sb.Append(string.Format("Z: {0}", mapPoint.Z)); } vm.Text = sb.ToString(); }); }