pts.AddXY(X1, Y1, 1);
pts.AddXY(X2, Y2, 2);
Newobj:= MapX.FeatureFactory.CreateLine(pts, StyleTrueFont);
Newobj.KeyValue := 'Line';
Newobj:= lyrEditLayer.AddFeature(Newobj, EmptyParam);
pts.RemoveAll;
上面pts : Points;
Newobj: Feature;lyrEditLayer是你需要画的图层名字。StyleTrueFont:Style 也可以用缺省的Style.
还有不明白的吗?