求基于C#、arcengine查询地图属性的源文件 20
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励10(财富值+成长值)+提问者悬赏20(财富值+成长值)
1个回答
2015-06-11
展开全部
没有源文件,获取要素属性的方法如下:
ILayer layer = axMapControl1.get_Layer(0);
IFeatureLayer flayer = layer as IFeatureLayer;
IFields fields = flayer.FeatureClass.Fields;
for (int j = 0; j < fields.FieldCount; j++)
{
fields.get_Field(j).Name;//字段名称
}
IFeatureCursor cursor = flayer.Search(null, false);
IFeature f = null;
while ((f = cursor.NextFeature()) != null)
{
flayer.get_Value(j);//值
}
另外,系统自带识别类是:ESRI.ArcGIS.Controls.ControlsMapIdentifyToolClass
ILayer layer = axMapControl1.get_Layer(0);
IFeatureLayer flayer = layer as IFeatureLayer;
IFields fields = flayer.FeatureClass.Fields;
for (int j = 0; j < fields.FieldCount; j++)
{
fields.get_Field(j).Name;//字段名称
}
IFeatureCursor cursor = flayer.Search(null, false);
IFeature f = null;
while ((f = cursor.NextFeature()) != null)
{
flayer.get_Value(j);//值
}
另外,系统自带识别类是:ESRI.ArcGIS.Controls.ControlsMapIdentifyToolClass
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询