c# - 由 ArcGIS 引擎 SDK 提供支持的 .NET 程序报告找不到类型或命名空间 "AxMapControl "

标签 c# debugging esri-arc-engine

我有一个由 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/

相关文章:

gis - 可用的 GIS 工具包?

arcgis - 在旧硬件上使用 ArcGIS API for JS 构建的 Web 应用程序性能不佳

javascript - 用于实时跟踪的 ESRI javascript API

c# - << 运算符的奇怪行为

c# - 在特定条件下使用 LINQ 从列表中获取数字

c# - WPF 更改按钮的角半径,同时仍然使用按钮的默认样式

java - 在 Eclipse 调试时更改长数组的值

c# - Debug.WriteLine 到不同的 "channel"?

c# - 自托管 WCF 服务的多个实例

sharepoint - 调试 SharePoint 2007 代码