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

mapxtreme在vs里怎么用_mapxtreme_arcgis engine(5)

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

//将地图坐标系转换为经纬度投影

MapInfo.Geometry.CoordSys LonLat=cf.CreateFromMapBasicString("CoordSys Earth Projection 1, 0");

_map.SetDisplayCoordSys (LonLat);

//将非地球坐标下的查找点转换我经纬度投影下的点

MapInfo.Geometry.CoordinateTransform Transformer=cf.CreateCoordinateTransform(LonLat,Nonearth);

MapInfo.Geometry.DPoint dpt=Transformer.CoordSys2ToCoordSys1(pt);

//设置查找半径

Distance d = MapInfo.Mapping.SearchInfoFactory.ScreenToMapDistance(_map, 3);

SearchInfo si = MapInfo.Data.SearchInfoFactory.SearchNearest(dpt, LonLat, d);

IResultSetFeatureCollection fc = _catalog.Search("MAP_AREA", si);

Session.Current.Selections.DefaultSelection.Add(fc);

}

finally

{

Cursor.Current = Cursors.Default;

}

nonearth问题在6.2中已经完全解决.

8.有两个MapControls,怎样使其中一个保存为.MWS

MapInfo.Persistence.WorkSpacePersistence wsp = new MapInfo.Persistence.WorkSpacePersistence();

System.IO.FileStream file = new System.IO.FileStream("C:\temp\Test.mws", System.IO.FileMode.CreateNew);

wsp.Save(this.mapControl2.Map.Clone() as MapInfo.Mapping.Map,file);

file.Close();

9.查看特定几个图层

假定让lyr1和lyr2两个图层充满整个地图窗口:

Table[] ts= new Table[2];

ts[0] = lyr1.Table;

ts[1] = lyr2.Table;

IMapLayerFilter iml = MapLayerFilterFactory.FilterByTable(ts);

MapLayerEnumerator mle = mapControl1.Map.Layers.GetMapLayerEnumerator(iml);

mapControl1.Map.SetView(mle);

10.//创建临时层

TableInfoMemTable tblInfoTemp = new TableInfoMemTable("Animation");

MapInfo.Data.Table tblTemp = cat.GetTable("Animation");

if (tblTemp != null) //Table exists close it

{

cat.CloseTable("Animation");

}

tblInfoTemp.Columns.Add(ColumnFactory.CreateFeatureGeometryColumn(MapControl1.Map.GetDisplayCoordSys()));


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

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

    • 郑志平
      郑志平

      可怜的伊拉克连反恐的自由也没有了

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