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

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

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

MapInfo.Data.SpatialSchemaXY xy = new MapInfo.Data.SpatialSchemaXY();

xy.XColumn = "X";

xy.YColumn = "Y";

xy.NullPoint = "0.0, 0.0";

xy.StyleType = MapInfo.Data.StyleType.None;

xy.DefaultStyle = new MapInfo.Styles.CompositeStyle();

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

//建立TableInfo

MapInfo.Data.TableInfoServer ti = new MapInfo.Data.TableInfoServer("Customers","Driver={SQL Server};Server=LIXIAOHUI;Database=test;Uid=sa;Pwd=sa;","select * from Us_Cust",MapInfo.Data.ServerToolkit.Odbc);

ti.SpatialSchema = xy;

MapInfo.Data.Table miCustomers = MapInfo.Engine.Session.Current.Catalog.OpenTable (ti);

MapInfo.Mapping.FeatureLayer featureLayer = new MapInfo.Mapping.FeatureLayer(miCustomers);

mapControl1.Map.Layers.Add(featureLayer);

mapControl1.Map.SetView(featureLayer);

3.如何查看整个地图

Map map = mapControl1.Map;

IMapLayerFilter lyrFilter = MapLayerFilterFactory.FilterByType(typeof(FeatureLayer));

MapLayerEnumerator lyrEnum= map.Layers.GetMapLayerEnumerator(lyrFilter);

map.SetView(lyrEnum);

或者:

Map map = mapControl1.Map;

IMapLayerFilter lyrFilter = new FilterByLayerType(LayerType.Normal);

MapLayerEnumerator lyrEnum= map.Layers.GetMapLayerEnumerator(lyrFilter);

map.SetView(lyrEnum);


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

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

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