hahaaluo
路人甲
路人甲
  • 注册日期2006-08-05
  • 发帖数146
  • QQ
  • 铜币591枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:947回复:0

实现了IDENTIFY功能的

楼主#
更多 发布于:2006-08-16 21:09
<P>IMap  pMap;<BR>    IPoint   pPoint;<BR>    pMap = axMapControl1.Map;<BR>    pPoint = axMapControl1.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(e.x, e.y);;</P>
<P>    IIdentify   pIdentify;<BR>    IArray   pIDArray;<BR>    IFeatureIdentifyObj     pFeatIdObj;<BR>    IIdentifyObj    pIdObj;<BR>    pIdentify = pMap.get_Layer(0) as IIdentify;</P>
<P>    IEnvelope    pEnv;<BR>    pEnv = new Envelope() as IEnvelope;<BR>    pEnv = axMapControl1.ActiveView.Extent;<BR>    pEnv.Height = 0.5;<BR>    pEnv.Width =0.5;<BR>                pEnv.CenterAt (pPoint);</P>
<P>    pIDArray = pIdentify.Identify(pEnv);</P>
<P><BR>    pFeatIdObj = pIDArray.get_Element(0) as IFeatureIdentifyObj ;<BR>    pIdObj = pFeatIdObj as IIdentifyObj;<BR>                pIdObj.Flash(axMapControl1.ActiveView.ScreenDisplay);<BR>              //消息显示查询目标的信息<BR>             MessageBox.Show("Layer:"+pIdObj.Layer.Name+"\r\n"+"Feature:"+pIdObj.Name);<BR>            </P>
喜欢0 评分0
游客

返回顶部