2

我有一个由 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;
        }
    }
4

1 回答 1

0

你需要参考ESRI.ArcGIS.AxControls哪个包含AxMapControl。然后,您可以使用Windows 窗体控件通过控件放置在 WPF 窗口或页面上,该WindowsFormsHost控件提供了一个可以承载单个 Windows 窗体控件的容器。

于 2015-09-08T03:42:59.387 回答