MAPBASIC开发资料及源代码.docVIP

  • 199
  • 0
  • 约1.78万字
  • 约 17页
  • 2018-04-23 发布于江西
  • 举报
MAPBASIC开发资料及源代码.doc

MAPBASIC开发资料及源代码 目录 P2:实习八??GIS产品开发 P8:用VC开发Mapinfo程序。 P13:MapInfo上的GIS系统开发 P16:利用OLE自动化技术(OLEAutomation)与其他应用程序交互集成进行Maplnfo GIS二次开发 实习八??GIS产品开发 一、目的 通过实习掌握简单的MapBasic编程方法,并将课程实习成果做一个汇总。 二、要求 修改参考程序,将本学期各人的实习成果贯穿其中,形成自己的实习成果展示系统。 三、步骤 1.阅读参考程序,弄懂各语句的语法结构及其作用。 1.阅读参考程序,弄懂各语句的语法结构及其作用。 2.在MapInfo中制作一个如下图的系统封面,保存为“系统封面.wor” 3.将实习二的成果栅格图形进行屏幕硬拷贝,并在画板中保存为bmp文件,然后在MapInfo中打开该图像,生成相应的Table文件。 4.修改参考程序,使“信息查询”菜单下增加所缺大洲的菜单项,并修改相应的子程序。 5.修改参考程序中调用的文件名及其路径,以符合各自的实际情况。 四、参考程序 include mapbasic.def include menu.def declare sub main declare sub shixi14 declare sub shixi2 declare sub shixi5 declare sub shixi7 declare sub shixi71 declare sub condQuery declare sub classQuery declare sub classStatic declare sub exitSub declare sub oksub global applPath as string sub main applpath=ApplicationDirectory$() 该语句将应用程序的路径输入给变量applpath close all run application applPath+系统封面.wor create menu 柵格数据生成与显示 as 栅格图形显示 id 1 calling shixi2 create menu 数字化成果显示 as 实习一 id 1 calling shixi14, 实习四 id 2 calling shixi14, 配准前后结果比较 id 3 calling shixi14 create menu 属性数据库显示 as 附录表显示 calling shixi5 create menu 信息查询 as 亚洲地区 id 1 calling classQuery, 非洲地区 id 2 calling classQuery, (-, 条件查询 calling condQuery create menu 统计图与专题地图显示 as 统计图 id 1 calling shixi71, (-, 教职工分布图 id 2 calling shixi7, 人均收入图 id 3 calling shixi7, 人口分布图 id 3 calling shixi7 create menu 退出 as 退出 calling exitSub create menu bar as 柵格数据生成与显示,数字化成果显示,属性数据库显示, 信息查询,统计图与专题地图显示,退出 end sub sub shixi14 close all open table applpath+point as point open table applpath+line as line open table applpath+region as region open table applpath+城市点位 as city open table applpath+长江黄河 as river open table applpath+省区 as province do casecommandinfo(CMD_INFO_MENUITEM) case 1 map from point,line,region max Set Map Zoom Entire case 2 map from city,river,province max Set Map Zoom Entire case 3 map from point,line,region max Set Map Zoom Entire map from city,river,province max Set Map Zoom Entire Run Menu Command 611 611为平铺窗口命令,亦可用M_WINDOW_TILE代替 end case end sub sub shixi2

文档评论(0)

1亿VIP精品文档

相关文档