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

加入VIP,免费下载
 

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

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

下载须知

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

版权提示 | 免责声明

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

th计算机网路编程课程设计.docx

1、th计算机网路编程课程设计一、 设计内容1、 学习MapXtreme电子地图。2、 利用C#+MapXtreme实现电子地图网站的开发。二、 实验要求1、 编程实现图元添加显示功能;2、 实现图元查找功能;3、 实现图元移动功能;4、 实现图元删除功能三、 软件安装1、 安装IISA、 解压IIS_XPSP3.rarB、 点击控制面板点击添加删除程序点击“添加/删除windows组件”在弹出的对话框中选择“Internet信息服务”点击下一步。C、 需要选择文件时选择刚才解压的文件。2、 安装VS2005:按默认选项安装。3、 安装MapXtremeA、 双击MapXtreme 2008 6.

2、8 中文破解版目录中的MapXtremeTRIALCHS.exe文件。B、 将MapXtreme 2008 6.8 中文破解版6.8破解mapxtreme680. lic文件拷贝到C:Program FilesCommon FilesMapInfoMapXtreme6.8.0目录四、 程序设计1、打开VS,打开给定的工程FireControlGIS.sln。2、打开Web.Config,找到将路径改为相应的目录。3、 将resi char font.ttf文件拷到C:WINDOWSFonts目录下。4、 建立人员结构类。打开clsUserType.cs文件,在类文件中填入如下代码:public

3、 class clsUserType private string strBMID; private string personID; private string personName; private MapInfo.Geometry.DPoint DPoint; private string strUserType() this.strBMID=电子信0901; this.personID=0111; this.personName=+; this.DPoint=new MapInfo.Geometry.DPoint(1,1); this.strFileName=LITE2-32.BMP

4、; public void setstrBMID(string strBMID) this.strBMID=strBMID; public void setpersonID(string personID) this.personID=personID; public void setpersonName(string personName) this.personName=personName; public void setDPoint(MapInfo.Geometry.DPoint DPoint) this.DPoint=DPoint; public void setstrFIleNam

5、e(string strFIleName) this.strFIleName=strFIleName; public string getstrBMID() return this.strBMID; public string getpersonID() return this.personID; public string getpersonName() return this.personName; public MapInfo.Geometry.DPoint getDPoint() return this.DPoint; public string getstrFIleName() re

6、turn this.strFIleName; 5、 建立取得屏幕坐标点的类文件。打开WebInfoGetXY.cs类并输入下图所示代码。public class WebInfoGetXY:MapInfo.WebControls.MapBaseCommand public WebInfoGetXY() base.Name=GetXY; public override void Process() MapControlModel model=MapControlModel.GetModelFromSession(); MapInfo.Mapping.Map map=model.GetMapObj(

7、MapAlias); System.Drawing.Point points=ExtractPoints(DataString); MapInfo.Geometry.DPoint dpoint=new MapInfo.Geomtry.Dpoint(); map.DisplayTransform.FromDisplay(points0,out dpoint);string outText=屏幕xy:+points0.X+,+points0.Y; outText +=经纬度xy:+dpoint.x,+dpoint.y;HttpContext.Current.Response.Write(outTe

8、xt); 6、 建立地图操作命令类。clsMapCommand.cs并输入下图代码。public class clsMapCommand:MapInfo.WebControls.MapBaseCommand private MapControlModel model; private MapInfo.Mapping.Map map; public clsMapCommand() bass.Name=MapCommand: public override void Process() string Commad_type=Convert.ToString(HttpContext.Current.

9、RequestCommad_type); string LayerTable_name=Convert.ToString(HttpContext.Current.RequestLayerTable_name); string feature_name=Convert.ToString(HttpContext.Current.Requestfeature_name); string feature_kind=Convert.ToString(HttpContext.Current.Requestfeature+kind); Double point_x=Convert.ToString(Http

10、Context.Current.Requestpoint_x); Double point_y=Convert.ToString(HttpContext.Current.Requestpoint_y); CommonUserGisFuncyion_CommonUserGisFunction=newCommonUserGisFunction(); model=MapControlModel.GetModelFromSession(); map=model.GetMapObj(MapAlias); if(LayerTable_name=nill) LayerTable_name=newLayer;

11、switch(Commad_type) case Select: _CommonUserGisFunction.SearchWithSearch(map,LayerTable_name,feature_name,feature_kind); break; case Move: _CommonUserGisFunction.MoveObject(map,LayerTable_name,feature_name, feature_kind, new MapInfo.Geometry.DPoint(point_x,point_y); break; case ClearAllObject: _Comm

12、onUserGisFunction.clear_feature(map,LayerTable_name); break; case ClearObject: _CommonUserGisFunction.clear_feature(map,LayerTable_name,feature_name,feature_kind; break; case Refresh: _CommonUserGisFunction.Update_Person_Position(map,LayerTable_name); break; default: break; 7、 在main.aspx.cs文件的pageLo

13、ad函数中输入添加图层人员的代码。#regionif(myMap!=null) if(myMap.LayersnewLayer!=null) myMap.Layers.Remove(newLayer); if(myMap.LayersroadLayer!=null) myMap.Layers.Remove(roadLayer); CommonUserGisFunction _CommonUserGisFunction=new CommonUserGisFunction()MapInfo.Mapping.IMapLayer ly=_CommonUserGisFunction.CreatNewLa

14、yer(myMap,newLayer,mewLayer);myMap.Layers.Insert(2,ly);clsUserType _clsUserType=new clsUserType();_clsUserType.setDPoint(new MapInfo.Geometry.DPoint(2,2);_clsUserType.setpersonName(自定义点);_clsUserType.setpersonID(0000);CommonUserGisFunction.AddPointToLayer(myMap,newLayer,newLayer,_clsUserType);FontPo

15、intStyle fStyle=new FontPontPointStyle();fStyle.Code=76;fStyle.PointSize=24;fStyle.Color=System.Drawing.Color.Red;fStyle.Font.Name=resident evil characters;fStyle.Font.FontWeight=MapInfo.Styles.FontWeight.Bold;fStyle.Angle=400;_clsUserType.setDPoint(new MapInfo.Geometry.DPoint(1.6,1.6);_clsUserType.

16、setpersonID(0111);_clsUserType.setpersonName(佟环);CommonUserGisFunction.AddPointToLayer(myMap,newLayer,newLayer,_clsUserType,fStyle);SimpleVectorPointStyle vStyle=new SimpleVectorPointStyle();vStyle.Code=67;vStyle.Color=System.Drawing.Color.Red;vStyle.PointSize=Convert.ToInt16(24);vStyle.Attributes=S

17、tyleAttributes.PointAttributes.BaseAll;vStyle.SetApplyAll();_clsUserType.setDPoint(new MapInfo.Geometry.DPoint(1,1);CommonUserGisFunction.AddPointToLayer(myMap,newLayer,newLayer,_clsUserType,vStyle);#endregion完成上面步骤后运行程序可以实现地图显示功能,在显示的地图中出现三个位图点。8、 图元查找、移动、删除功能实现。在main.aspx文件中填入如下代码。A、 在位置填入下列代码。属性名

18、称属性值B、 在位置添加如下图所示的SelectObject()函数。function SelectObject() var mapImage=document.getElementById(MapControl1_Image); var feature_name=document.forms0.feature_name.value; var feature_value=document.forms0.feature_value.value; var url=MapController.ashx?Command=MapCommand&Width=+mapImage.width+&Height=

19、+mapImage.height+&ExportFormat=+mapImage.exportFormat+&Ran=+Math.random()+&Commad_type=Select&feature_name=+feature_name+&feature_kind=佟环; if(mapImage.mapAlias) url+=&MapAlias=+mapImage.mapAlias; var xmlHttp=null; if(BrowserType()=IE) xmlHttp=new ActiveXObject(Microsoft.XMLHTTP); else if(BrowserType

20、()=NS) xmlHttp=new XMLHttpRequest(); xmlHttp.open(GET,url,false); xmlHttp.send(null); var result=xmlHttp.responseText; alert(result); UpdateMap(); ShowMapArea(); C、 在位置输入如下所示的移动图元代码。function MoveObject() var mapImage=document.getElementById(MapControl1_Image); var feature_name=document.forms0.featur

21、e_name.value; var feature_value=document.forms0.feature_value.value; var url=MapController.ashx?Command=MapCommand&Width=+mapImage.width+&Height=+mapImage.height+&ExportFormat=+mapImage.exportFormat+&Ran=+Math.random()+&Commad_type=Move&feature_name=+feature_name+&feature_kind=佟环&point_x=2.2&point_y

22、=2.2; var xmlHttp=null; if(BrowserType()=IE) xmlHttp=new ActiveXObject(Microsoft.XMLHTTP); else if(BrowserType()=NS) xmlHttp=new XMLHttpRequest(); xmlHttp.open(GET,url,false); xmlHttp.send(null); var result=xmlHttp.responseText; alert(result); UpdateMap(); ShowMapArea(); D、 在位置输入如下删除所有图元代码。function

23、ClearAllObject() var mapImage=document.getElementById(MapControl1_Image); var url=MapController.ashx?Command=MapCommand&Width=+mapImage.width+&Height=+mapImage.height+&ExportFormat=+mapImage.exportFormat+&Ran=+Math.random()+&Commad_type=ClearAllObject; var xmlHttp=null; if(BrowserType()=IE) xmlHttp=

24、new ActiveXObject(Microsoft.XMLHTTP); else if(BrowserType()=NS) xmlHttp=new XMLHttpRequest(); xmlHttp.open(GET,url,false); xmlHttp.send(null); var result=xmlHttp.responseText; alert(result); UpdateMap(); ShowMapArea(); E、 在位置输入删除图元代码。function ClearObject() var mapImage=document.getElementById(MapCon

25、trol1_Image); var feature_name=document.forms0.feature_name.value; var feature_value=document.forms0.feature_value.value; var url=MapController.ashx?Command=MapCommand&Width=+mapImage.width+&Height=+mapImage.height+&ExportFormat=+mapImage.exportFormat+&Ran=+Math.random()+&Commad_type=ClearObject&fea

26、ture_name=+feature_name+&feature_kind=佟环; var xmlHttp=null; if(BrowserType()=IE) xmlHttp=new ActiveXObject(Microsoft.XMLHTTP); else if(BrowserType()=NS) xmlHttp=new XMLHttpRequest(); xmlHttp.open(GET,url,false); xmlHttp.send(null); var result=xmlHttp.responseText; alert(result); UpdateMap(); ShowMap

27、Area();9、参照步骤步骤6添加班级其他同学,并显示。10、实现按文本框中的内容查找、删除图元功能:参照下列代码修改main.aspx文件中的SelectObject()、MoveObject()、ClearObject()函数,在函数中添加下列代码并将url中的Name和XXX改为下图所示的形式。function SelectObject() var mapImage=document.getElementById(MapControl1_Image); var feature_name=document.forms0.feature_name.value; var feature_va

28、lue=document.forms0.feature_value.value; var url=MapController.ashx?Command=MapCommand&Width=+mapImage.width+&Height=+mapImage.height+&ExportFormat=+mapImage.exportFormat+&Ran=+Math.random()+&Commad_type=Select&feature_name=+feature_name+&feature_kind=+feature_value+; if(mapImage.mapAlias) url+=&MapAlias=+mapImage.mapAlias;

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2