帮助有一下一段代码:)关于查询的,可以去试一下。
Feature fFlorida = _catalog.SearchForFeature("usa", MapInfo.Data.SearchInfoFactory.SearchWhere("State='FL'"));
SearchInfo si = MapInfo.Data.SearchInfoFactory.SearchWithinGeometry(fFlorida, ContainsType.Centroid);
IResultSetFeatureCollection fc = MapInfo.Engine.Session.Current.Catalog.Search("uscty_1k", si);
// Set the map view to show search results
MapInfo.Engine.Session.Current.MapFactory[0].SetView(fc.Envelope);// Set the view of the first map.
// Add results to selection.
MapInfo.Engine.Session.Current.Selections.DefaultSelection.Add(fc);
SearchInfo si = MapInfo.Data.SearchInfoFactory.SearchAll();
IResultSetFeatureCollection fc = MapInfo.Engine.Session.Current.Catalog.Search("Station", si);
执行第二局的时候报错,说数据类型不匹配,但是帮助里面说支持表的别名呀:
public IResultSetFeatureCollection Search(
string tableAlias,
SearchInfo searchInfo
);
Parameters:
tableAlias: The alias of the table to search.
searchInfo:Search definition.