ArcEngine 如何判断Feature在哪个图层
展开全部
直接判断每个要素类图层的selection条数是否为0:
string s = "";
for (int i = 0; i < axMapControl1.LayerCount; i++)
{
if (axMapControl1.get_Layer(i) is FeatureLayer)
{
IFeatureLayer pFeatureLayer = axMapControl1.get_Layer(i) as IFeatureLayer;
IFeatureSelection pFeatureSelection = pFeatureLayer as IFeatureSelection;
ISelectionSet pSelectionSet = pFeatureSelection.SelectionSet;
if (pSelectionSet.Count != 0)
s += pFeatureLayer.Name + "\r\n";
}
}
if (s != "") MessageBox.Show(s);
string s = "";
for (int i = 0; i < axMapControl1.LayerCount; i++)
{
if (axMapControl1.get_Layer(i) is FeatureLayer)
{
IFeatureLayer pFeatureLayer = axMapControl1.get_Layer(i) as IFeatureLayer;
IFeatureSelection pFeatureSelection = pFeatureLayer as IFeatureSelection;
ISelectionSet pSelectionSet = pFeatureSelection.SelectionSet;
if (pSelectionSet.Count != 0)
s += pFeatureLayer.Name + "\r\n";
}
}
if (s != "") MessageBox.Show(s);
ZESTRON
2024-09-04 广告
2024-09-04 广告
表面污染分析包括评估表面上存在的颗粒、残留物或物质。通过利用显微镜、光谱学和色谱法等技术,分析人员可以识别和表征污染物,以确定其成分和来源。这种分析在电子、制药和制造等各个行业中至关重要,以确保产品质量、性能和安全性。了解表面污染有助于实施...
点击进入详情页
本回答由ZESTRON提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询