2024年3月22日发(作者:)
ArcEngine 距离测量和面积测量实现
上一篇 / 下一篇 2010-08-13 17:08:13 / 个人分类:ArcEngine
查看( 171 ) / 评论( 0 ) / 评分( 0 / 0 )
本文来自CSDN博客,转载请标明出处:/chyocean/archive/2008/04/28/
觉得这个自定义ITool实现的很完整,所以就借鉴过来了。
面积测量中最主要的接口就是INewPolygonFeedback。
下面就是的全部内容,这是将实现和调用分开的。
//自定义画多边形,测面积
m(new AreaMeasure(), -1, -1, true, 0,
mmandStyleIconOnly);
添加面积测量的功能。
的实现如下:
using System;
using ;
using ry;
using ls;
using y;
using UI;
using stem;
using ;
using pServices;
namespace ds
{
[ClassInterface()]
[Guid("5C214724-BFA2-4e8c-BC5D-775C67FA6F56")]
///
/// 测量距离功能
///
public class AreaMeasure : ICommand, ITool
{
#region COM Registration Function(s)
[ComRegisterFunction()]
[ComVisible(false)]
static void RegisterFunction(Type registerType)
{
// Required for ArcGIS Component Category Registrar support
ArcGISCategoryRegistration(registerType);
//
// TODO: Add any COM registration code here
//
}
[ComUnregisterFunction()]
[ComVisible(false)]
static void UnregisterFunction(Type registerType)
{
// Required for ArcGIS Component Category Registrar support
ArcGISCategoryUnregistration(registerType);
//
// TODO: Add any COM unregistration code here
//
}
#region ArcGIS Component Category Registrar generated code
///
/// Required method for ArcGIS Component Category registration -
/// Do not modify the contents of this method with the code editor.
///
private static void ArcGISCategoryRegistration(Type registerType)


发布评论