b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

mapxtreme 2008破解_mapxtreme pitney_mapxtreme(4)

电脑杂谈  发布时间:2017-01-21 20:06:21  来源:网络整理

tables[0]=Connection.Catalog.OpenTable(@"G:\Ch_shenghui.TAB");

tables[1]=Connection.Catalog.OpenTable(@"G:\Shengjie_p.TAB");

mapControl1.Map.Load(new MapInfo.Mapping.MapTableLoader(tables));

问:如何在MapXtreme2004桌面应用程序中的任务栏上显示出鼠标的坐标?

答:

1、添加mapControl1的MouseMove事件;

2、该事件及其中代码如下:

public void MapControl1_MouseMove(object sender, MouseEventArgs e)

{

System.Drawing.PointF DisplayPoint = new PointF(e.X,e.Y);

MapInfo.Geometry.DPoint MapPoint = new MapInfo.Geometry.DPoint();

MapInfo.Geometry.DisplayTransform converter = this.mapControl1.Map.DisplayTransform;

converter.FromDisplay(DisplayPoint, out MapPoint);

this.statusBar1.Text = "Cursor Location: " + MapPoint.x.ToString() + ", " + MapPoint.y.ToString();

}

问:如何使用代码修改桌面应用程序的坐标系统

答:代码如下:

Map map = mapControl1.Map;

MapInfo.Geometry.CoordSys coordSys = Session.Current.CoordSysFactory.CreateLongLat(DatumID.WGS84);

map.SetDisplayCoordSys(coordSys);

7.在一个程序中要找到固定点附近最近的图元,于是想用SearchNearst。

但是总是出现异常,说"不能对NonEarth坐标系应用Spherical操作"

所以想问一下,MXT04中的SearchNearst方法是不是不支持NonEarth坐标系?

//这个问题在MapXtreme2004的6.0和6.1版本都会有。以后版本会改正。

//暂时解决方案:在经纬度投影坐标系中操作。

try

{

MapInfo.Mapping.Map _map=mapControl1.Map;

MapInfo.Data.Catalog _catalog=Session.Current.Catalog;

//打开非地球坐标系的图层,并设置地图坐标系

mapControl1.Map.Load(new MapTableLoader(@"E:\MapInfo\培训材料\技术培训教材与PPT\MapXtreme2004\示例\OpenTable\MAP_AREA.TAB"));

Cursor.Current = Cursors.WaitCursor;

MapInfo.Geometry.CoordSysFactory cf=new MapInfo.Geometry.CoordSysFactory();


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/tongxinshuyu/article-27883-4.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...