首页 > 其他分享 >ArcGIS Pro Tool,单击显示坐标

ArcGIS Pro Tool,单击显示坐标

时间:2022-09-20 19:45:04浏览次数:53  
标签:string 单击 Format Pro vm mapPoint ArcGIS var sb

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

相关文章

  • proj_match_points_ransac 算子
    proj_match_points_ransac(Image1,Image2::Rows1,Cols1,Rows2,Cols2,GrayMatchMethod,MaskSize,RowMove,ColMove,RowTolerance,ColTolerance,Rotation,Matc......
  • arcgis for js 4.x 点击要素高亮显示
    通常我们查看图层服务是否支持popupTemplate,然后设置显示的字段属性。但是我们不需要显示弹出窗口,只需要高亮显示要素,应该如何操作呢把popupTemplate设置成{}?不行,仍旧会......
  • Prometheus + Grafana 安装配置
    安装文件下载文件下载地址:prometheus-2.37.1.linux-amd64.tar.gzpushgateway-1.4.3.linux-amd64.tar.gznode_exporter-1.3.1.linux-amd64.tar.gzalertmanager-0.24.0.......
  • Problem P19. [算法课贪婪]三角形的最大周长
    贪心:选三个最长的边组成三角形,如果最长的三个边不能组成,那么这时候无论把第二和第三大的边换成什么都不可能能够和最大的边组成三角形,这时候就必须把最大的边给换掉,把最......
  • ArcGIS Pro 沿线飞行代码
    //Copyright2019Esri//LicensedundertheApacheLicense,Version2.0(the"License");//youmaynotusethisfileexceptincompliancewiththeLic......
  • Problem P20. [算法课蛮力法]种花问题
    我写的并不好,力扣上有比这更好的方法我的思路:从头遍历数组,检查位置是否能放下花,能放就放下,然后检查下一个位置,注意放下之后就改变了数组。然后就是注意前后数组越界,注意......
  • 我报名参加了Goldstone Project Phase 1 Challenge——瓜分100,000奖池,这是我的……
    我报名了GoldstoneProjectPhase1Challenge——瓜分100,000奖池,这是我的第10篇文章,点击查看活动详情Windows环境下安装下载并安装1.访问地址:https://zookeeper.apa......
  • kafka--Producer知识
    Producer发送模式同步发送异步发送异步发送回调Producer源码讲解Producer发送流程:1.构建对象2.发送消息KafkaProducer构建clientId,为了给metricConfig(上报......
  • leaflet下对arcgis server的服务进行属性识别
    使用arcgis自己的服务是可以的,但其实也可以esri-leaflet.js这个提供的插件会方便很多,贴上插件地址:https://esri.github.io/esri-leaflet/api-reference/tasks/identify-fe......
  • arcgis for javascript api做缓冲区分析
    需求内容:对某个arcgisserver发布的服务进行缓冲区分析,并且下载缓冲区的结果要素图层思路: 通过arcgis服务的find操作拿到所有的要素对要素进行缓冲区分析下载缓......