我有一个由 ArcGIS 引擎 SDK 版本 10.2 提供支持的 .NET 程序,旨在检查空间数据。 IDE 是 Microsoft Visual Studio 2012。我添加了所有以 ESRI.ARCGIS
开头的引用以及命名空间,但它仍然无法运行。我认为命名空间 ESRI.ARCGIS。 Controls
应该包含类 AxMapControl
但它没有。我该怎么做才能解决它?
部分代码如下所示。
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.DataSourcesRaster;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.SystemUI;
using Geoway.ADF.GIS.OpenDataDialog;
using Geoway.ADF.MIS.Core.Public.interfaces;
using Geoway.ADF.MIS.Core.Public.util;
using Geoway.ADF.MIS.Utility.Core;
using Geoway.ADF.MIS.Utility.Log;
using System;
using System.Collections;
using System.Data;
using System.Globalization;
using System.IO;
using System.Windows.Forms;
namespace Geoway.ADF.GIS.CheckerUI
{
public class MapManager
{
private AxMapControl m_MapControl;
private ICommand pControlsMapFullExtentCommand;
private ICommand pControlsMapPanTool;
private ICommand pControlsMapZoomInTool;
private ICommand pControlsMapZoomOutTool;
private ICommand pControlsMapPreViewCommand;
private ICommand pControlsMapNextViewCommand;
public ISimpleCallBack simAxisCallBack;
public ISimpleCallBack simSelCallBack;
private NumberFormatInfo nfi4 = ConvertUtil.GetNumFormatInfo(4);
private ArrayList m_lstFeatureClass;
private ArrayList m_lstRasterDataset;
private Form parentForm;
public AxMapControl MapControl
{
get
{
if (this.m_MapControl == null)
{
this.m_MapControl = new AxMapControl();
}
return this.m_MapControl;
}
set
{
this.m_MapControl = value;
}
}
最佳答案
您需要引用包含 AxMapControl 的 ESRI.ArcGIS.AxControls
。然后,您可以使用 WindowsFormsHost
控件将 Windows 窗体控件 放置在 WPF 窗口或页面上,该控件提供了一个可以承载单个 Windows 窗体控件的容器。
关于c# - 由 ArcGIS 引擎 SDK 提供支持的 .NET 程序报告找不到类型或命名空间 "AxMapControl ",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32448642/