ImageVerifierCode 换一换
格式:DOCX , 页数:11 ,大小:18.68KB ,
资源ID:15382590      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/15382590.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(GIS实验报告课件Word文档格式.docx)为本站会员(b****2)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

GIS实验报告课件Word文档格式.docx

1、三、源程序代码 . 7四、心得体会 . 14一、程序运行演示1. 新建项目文件,并实现 file 中的基本功能,显示地图基本要素。如图 1图 12. 在工具栏加载按钮, 按钮功能是对当前视图缩小 3 倍;在工具栏加载工具, 工具功能在地图上标注当前日期。如图 22图 2按钮实现缩小 3 倍功能操作,如图 3图 33.点击地图节点,弹出如图 4,图 5 菜单并实现菜单中的内容:图 43图 54. 点击图层节点,弹出如图 6 菜单并需要实现菜单中的内容图 65. 点击 Legend Class ,弹出符号选择对话框,该对话框供用户按需要选择符号并进行更改。如图 74图 76.打开图层属性表,用户选

2、择某条记录,可弹出如图 8,9 所示的右键菜单,并实现右键菜单中的内容5图 8图 9二、问题及解决方案问题 1.VS2008 与2010 之间要进行格式转换, 按照所导向的步骤进行, 否则程序将无法正常运行,出现错误问题 2. 构建好基本框架后,地图文档中要素显示出现问题。此问题要添加 licence 控件,否则无法显示地图要素。问题 3. 使用 Toolbar 和 Toc功能时无法进行操作此问题应在属性设置时建立关联功能。问题 4. 程序 Program文件中要添加相应功能键语句,否则将无法实现功能。问题 5. 引用接口,方法,例如 ADF,要添加相应的引用,否则程序出现错误。问题6. 在实

3、现两个自定义按钮与工具时,遇到的问题:先直接引用现有项未实现,发现缺少一些东西,后自己直接创建的 Basetool 和Basecomman类d ;在代码中报错,重新生成解决方案后顺利解决这个问题。问题7. 在实现地图和图层节点的右键功能时,遇到琐碎的问题,在这个过程中直接引用老师所给的几个类,但是报错,是因为命名空间未做修改;缺少引用,需要根据错误提示添加相应的引用6三、源程序代码using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Dra

4、wing;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO;using System.Runtime.InteropServices;using ESRI.ArcGIS.esriSystem;using ESRI.ArcGIS.Carto;using ESRI.ArcGIS.Controls;using ESRI.ArcGIS.ADF;using ESRI.ArcGIS.SystemUI;using ESRI.ArcGIS.Display;namespace WindowsFormsAp

5、plication2public partial class MainForm : Form#region class private membersprivate IMapControl3 m_mapControl = null;private string m_mapDocumentName = string.Empty;#endregionIMapDocument m_MapDocument = new MapDocument();#region class constructorprivate ITOCControl2 m_tocControl;private IToolbarMenu

6、 m_menuMap;private IToolbarMenu m_menuLayer;private ZoomIn3XCMD1 test = new ZoomIn3XCMD1();public MainForm()InitializeComponent();private void newDocumentToolStripMenuItem_Click(object sender, EventArgs e)7ICommand command = new CreateNewDocument();command.OnCreate(m_mapControl.Object);command.OnCli

7、ck();private void openDocumentToolStripMenuItem_Click(object sender, EventArgs e)openFileDialog1.Title = Save Map Document As;openFileDialog1.Filter = Map Documents (*.mxd)|*.mxdopenFileDialog1.ShowDialog();string sFilePath = openFileDialog1.FileName;if (axMapControl1.CheckMxFile(sFilePath)axMapCont

8、rol1.MousePointer =esriControlsMousePointer.esriPointerHourglass;axMapControl1.LoadMxFile(sFilePath, 0, Type.Missing);esriControlsMousePointer.esriPointerDefault;elseMessageBox.Show(sFilePath + is not a valid ArcMap document);return;private void MainForm_Load(object sender, EventArgs e)/get the MapC

9、ontrolm_mapControl = (IMapControl3)axMapControl1.Object;/disable the Save menu (since there is no document yet)this.menuSaveDoc.Enabled = false;/ 定义地图右键菜单,图层右键菜单m_tocControl = (ITOCControl2)axTOCControl1.Object;/ 添加菜单到地图节点m_menuMap = new ToolbarMenu();8m_menuMap.AddItem(esriControls.ControlsAdddataC

10、ommand, -1, 0, false,esriCommandStyles.esriCommandStyleTextOnly);m_menuMap.AddItem(new LayerVisibility(), 1, 1, false,m_menuMap.AddItem(new LayerVisibility(), 2, 2, false,/ 添加菜单到图层节点m_menuLayer = new ToolbarMenu();m_menuLayer.AddItem(new OpenAttributeTableCmd(), -1, 0, false,esriCommandStyles.esriCo

11、mmandStyleIconAndText);/ 右键添加属性表m_menuLayer.AddItem(new RemoveLayer(), 1, 1, false,m_menuLayer.AddItem(new RemoveLayer(), 1, 2, true,m_menuLayer.AddItem(new ScaleThresholds(), 2, 3, false,m_menuLayer.AddItem(new ScaleThresholds(), 3, 4, false,m_menuLayer.AddItem(new LayerSelectable(), 1, 5, true,m_menuLayer.AddItem(new LayerSelectable(), 2, 6, false,m_menuLayer.AddItem(new ZoomToLayer(), -1, 7, true,/Set the hook of each menum_menuLayer.SetHook(m_mapControl);m_menuMap.SetHook(m_mapControl);axToolbarControl1.AddItem(test, -1, -1, true, 0,esriCommandStyles.esriCommandStyleI

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1