Mapxtreme2005 两点之间画直线

private void DrawLine(MapInfo.Data.Table temptable,MapInfo.Geometry.DPoint begDpoint,MapInfo.Geometry.DPoint endDpoint,int Pattoner,System.Drawing.Color color)
        {
            MapInfo.Geometry.MultiCurve mc = MapInfo.Geometry.MultiCurve.CreateLine(map.GetDisplayCoordSys(), begDpoint, endDpoint);
            MapInfo.Styles.SimpleLineStyle bl = new MapInfo.Styles.SimpleLineStyle(new MapInfo.Styles.LineWidth(2, MapInfo.Styles.LineWidthUnit.Pixel), Pattoner, color);
            MapInfo.Styles.CompositeStyle cs = new MapInfo.Styles.CompositeStyle(null, bl, null, null);
            MapInfo.Data.Feature f = new Feature(temptable.TableInfo.Columns);
            f.Geometry = mc;
            f.Style = cs;
            temptable.InsertFeature(f);
        }

你可能感兴趣的:(map)