1、Search方法的区别
查看IfeatureLayer的Search方法的帮助,如下:
If there is a definition query set on the layer, theSearchmethod will work on the subset of features in the layer that meet the definition criteria. Otherwise, it will search theFeatureClassassociated with the layer.
ThisSearchmethod will not work on joined fields. If theFeaureLayerhas any joins, you should use theIGeoFeatureLayer::SeachDisplayFeaturesmethod instead.
值得注意的是,如果图层没有设置definition query ,那么两者的结果没有差别,但是如果图层设置了definition query ,那么就有差别了,呵呵。
参考:http://www.gisall.com/?uid-5999-action-viewspace-itemid-75
2、FeatureCount
featureLayer.FeatureClass.FeatureCount获得记录数永远是一个table所有记录数,所以一定要注意