用DrawObject画框,并选中框框内的图元:
//fLayer为FeatureLayerdouble x1,y1,x2,y2;mapControl.MapToScreen(rc.XMin,rc.YMin,out x1,out y1);mapControl.MapToScreen(rc.XMax,rc.YMax,out x2,out y2);//需要将屏幕坐标点转到Application.Current.RootVisual对应的坐标点var trans = mapControl.transformToVisual(Application.Current.RootVisual);//注意:pt1为最小坐标,pt2为最大坐标var pt1 = trans.transform(new Point(Math.Min(x1,x2),Math.Min(y1,y2)));var pt2 = trans.transform(new Point(Math.Max(x1,Math.Max(y1,y2)));var ftrs = fLayer.FindGraphicsInHostCoordinates(new Rect(pt1,pt2));foreach (var ftr in ftrs) ftr.Select();总结
以上是内存溢出为你收集整理的ArcGIS for SilverLight之FindGraphicsInHostCoordinates全部内容,希望文章能够帮你解决ArcGIS for SilverLight之FindGraphicsInHostCoordinates所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)