C#+ArcGIS Engine 空间查询
实现利用图层进行空间查询的功能,其功能界面如下:
其功能模块代码如下:
//从地图中读取目标图层和源图层
private void checkedListBoxControl_FeatureLayer_ItemCheck(object sender, DevExpress.XtraEditors.Controls.ItemCheckEventArgs e)
{
comboBox_SourceLayer.Properties.Items.Clear(); //目标图层勾选之前先清空一下源图层ComboBox
for (int i = 0; i < checkedListBoxControl_FeatureLayer.Items.Count; i++) //遍历所有的目标图层
{
if (checkedListBoxControl_FeatureLayer.Items[i].CheckState == CheckState.Unchecked)
{
ComboInfo pComboInfo = checkedListBoxControl_FeatureLayer.Items[i].Value as ComboInfo;
comboBox_SourceLayer.Properties.Items.Add(pComboInfo);
}
}
comboBox_SourceLayer.SelectedIndex = 0;
}