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(); }); }
标签:string,单击,Format,Pro,vm,mapPoint,ArcGIS,var,sb From: https://www.cnblogs.com/gisoracle/p/16712239.html