IIdentify 实现要素属性查询
IMap pMap;
pMap = axMapControl1.Map;
IIdentify pIdentify;
pIdentify = (IIdentify)pMap.get_Layer(0);//设定图层
IEnvelope testRectangle;
testRectangle = axMapControl1.TrackRectangle();//拉框选择
IArray pArray;
pArray = pIdentify.Identify;
IFeatureIdentifyObj pFeatIdobj;
IIdenfityObj pIdObj;
if (pArray != null)
{
for (int i = 0; i < pArray.Count; i++)
{
pFeatIdObj = (IFeatureIdentifyObj)pArray.get_Element(i);
pIdObj = (IIdentifyObj)pFeatIdObj;
cbbAddAddress.Items.Add(pIdObj.Name);
}
}