设置地图视图功能的范围选定

2015-06-11 11:07:31  访问(1289) 赞(0) 踩(0)

MapInfo.Data.Table table = Session.Current.Catalog.OpenTable(@"C:\Documents and Settings\Administrator\桌面\map\GZ-landmark-LL-Shift.TAB");
            MapInfo.Mapping.FeatureLayer lyr = new FeatureLayer(table);
            MapInfo.Data.SearchInfo si = MapInfo.Data.SearchInfoFactory.SearchWhere("E_Name='Wanli Shopping Centre'");
            Session.Current.Catalog.Search(lyr.Table, si, Session.Current.Selections.DefaultSelection, ResultSetCombineMode.AddTo);
            MapInfo.Data.IResultSetFeatureCollection irfc = Session.Current.Selections.DefaultSelection[lyr.Table];
            MapInfo.Data.Feature f = irfc[0];
            MapInfo.Geometry.DPoint pnt = new MapInfo.Geometry.DPoint(f.Geometry.Centroid.x, f.Geometry.Centroid.y);
            mapControl1.Map.Center = pnt;
            mapControl1.Map.Bounds= f.Geometry.Bounds;


标签:设置地图视图功能的范围选定 

上一条:

下一条:


 

相关评论

评论加载中……
 

发表评论

类型:
内容:
  (Alt+Enter)
 
  ┈全部┈  
 
(显示默认分类)