gisempire100
捉鬼专家
捉鬼专家
  • 注册日期2004-08-13
  • 发帖数552
  • QQ
  • 铜币2462枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1828回复:1

IFeatureLayer和IFeatureClass的Search方法的区别

楼主#
更多 发布于:2008-01-04 17:58
<P>查看IfeatureLayer的Search方法的帮助,如下:</P>
<P>If there is a definition query set on the layer, the <STRONG>Search </STRONG>method will work on the subset of features in the layer that meet the definition criteria. Otherwise, it will search the <B>FeatureClass</B> associated with the layer.</P>
<P>This <STRONG>Search</STRONG> method will not work on joined fields. If the <STRONG>FeaureLayer</STRONG> has any joins, you should use the <STRONG>IGeoFeatureLayer::SeachDisplayFeatures </STRONG>method instead.</P>
<DIV>值得注意的是,如果图层没有设置definition query ,那么两者的结果没有差别,但是如果图层设置了definition query ,那么就有差别了,呵呵。</DIV>
<DIV > </DIV>
<DIV >也就是说,在开发过程中,如果是针对图层数据的操作,那么用IfeatureLayer的Search比较合理,如果是针对图层对应的数据源的操作,那么使用IfeatureClass的search才能保证所有的数据被遍历。</DIV>
喜欢0 评分0
A friend is never known till a man has need. ...CL
lyangelwing
路人甲
路人甲
  • 注册日期2009-07-30
  • 发帖数1
  • QQ
  • 铜币103枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2009-08-15 14:05
....哦~不太明白
举报 回复(0) 喜欢(0)     评分
游客

返回顶部