添加BaseCommand 和Base Tool 的注意事项

添加Base Tool

调用重载 onmousedown 函数(与地图交互的操作)的语句
 ICommand pCommand;
            pCommand = new SimpleRenderer();

            pCommand.OnCreate(m_mapControl.Object);
            m_mapControl.CurrentTool = pCommand as ITool;

 

 添加Base Command时:

调用重载 click函数的语句

ICommand pCommand;
            pCommand = new ESRI.ArcGIS.Controls.ControlsMapZoomToLastExtentForwardCommandClass();
            pCommand.OnCreate(m_mapControl.Object);
            pCommand.OnClick();

posted @ 2008-11-09 15:29  周文  阅读(880)  评论(0编辑  收藏  举报