In MXT, geometry & style are object model.
在mxt中,几何实体和样式都是对象模型。
The follow example code demonstrate how to create a geometry , add it to map to display it:
下面的代码演示了怎样生成一个几何对象(Point),然后+到地图控件上去显示。
The code is not difficult, but I put is here only because it covers many concepts like CoordSys(&CoordSysFactory:Design Patter Concepte), TableInfo(TableInfoMemTable), Table(Column,GeometryColumn,MI Ado.net data provider MIConnection, MICommand), Feature(FeatureGeometry)
代码本身并不难,我在这里放置这段代码的原因是因为它涉及到很多概念:坐标系(坐标系工厂:设计模式概念),表格元数据:表格信息(内存表格),表格(列,集合列,MapInfo数据提供者,数据连接,命令)图元(几何图元)
I hope u can have a deeper understanting about i
希望你能有一个深刻的理解。
The code is without any comment, I think u r more clever than me.
代码没有注释,因为我认为你比我更聪明,
1
private void button1_Click(object sender, System.EventArgs e)
2
}
2
因为几何实体都是对象,所以你可以创建自己的几何实体,并+到地图上去显示它;所有的代码都是很相似,仅仅是不同类型,其构造方法不同而已。