ArcGIS for SilverLight之FindGraphicsInHostCoordinates
2013-04-18 19:05
344 查看
用DrawObject画框,并选中框框内的图元:
//fLayer为FeatureLayer double 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, x2), Math.Max(y1, y2))); var ftrs = fLayer.FindGraphicsInHostCoordinates(new Rect(pt1, pt2)); foreach (var ftr in ftrs) ftr.Select();
相关文章推荐
- ArcGIS API for Silverlight开发入门(4):用户与地理信息之间的桥梁--GraphicsLayer
- ArcGIS API for Silverlight开发入门(4):用户与地理信息之间的桥梁--GraphicsLayer
- [专家讲座] ArcGIS API for Silverlight开发入门(4):用户与地理信息之间的桥梁--GraphicsLayer(转)
- [专家讲座] ArcGIS API for Silverlight开发入门(4):用户与地理信息之间的桥梁--GraphicsLayer(转)
- Silverlight小技巧--FindElementsInHostCoordinates
- ArcGIS API for Silverlight开发入门(4):用户与地理信息之间的桥梁--GraphicsLayer
- ArcGIS API for Silverlight开发入门(4):用户与地理信息之间的桥梁--GraphicsLayer
- could not find a getter for ... in class ... 异常的原因解析
- ArcGIS API for Silverlight调用GP生成等值线输入要素集FeatureSet
- Silverlight+IIS7.5+WCF Unhandled Error in Silverlight Application Load operation failed for query
- ArcGIS API for Silverlight 实现修改地图上的工程点位置
- 使用ArcGIS API for Silverlight实现地形坡度在线分析
- error: request for member 'FindClass' in something not a structure or union
- ArcGIS API For JavaScript——空间查询(FindTask和IdentifyTask)
- 使用ArcGIS API for Silverlight实现地形坡度在线分析
- ArcGIS API for Silverlight开发入门(4):用户与地理信息之间的桥梁--GraphicsLayer
- ArcGIS API for Silverlight中加载Google地形图(瓦片图)
- ArcGIS API for Silverlight开发入门(2):一个基础地图实例
- Build failed in step 'Installing CLooG for host'
- ArcGIS API for Silverlight开发入门 (1)