码迷,mamicode.com
首页 > 其他好文 > 详细

ArcGIS Pro 删除选择范围的数据

时间:2020-03-26 10:45:39      阅读:300      评论:0      收藏:0      [点我收藏+]

标签:code   com   list   map   using   pair   key   called   color   

  protected override Task<bool> OnSketchCompleteAsync(Geometry geometry)
        {
            QueuedTask.Run(() =>
            {
                var deleteFeatures = new EditOperation();
                deleteFeatures.Name = "Delete Features";
                Polygon polygon = geometry as Polygon;

                //Delete all the selected features in the active view
                //Select using a polygon (for example)
                var selection = MapView.Active.SelectFeatures(polygon).Select(
                      k => new KeyValuePair<MapMember, List<long>>(k.Key as MapMember, k.Value));

                deleteFeatures.Delete(selection);

                //Execute to execute the operation
                //Must be called within QueuedTask.Run
                deleteFeatures.Execute();
            });
            return base.OnSketchCompleteAsync(geometry);

        }

 

ArcGIS Pro 删除选择范围的数据

标签:code   com   list   map   using   pair   key   called   color   

原文地址:https://www.cnblogs.com/gisoracle/p/12572604.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!