Dim oLayer As MapInfo.Mapping.FeatureLayer Dim otable As MapInfo.Data.Table Dim oftr As MapInfo.Data.Feature Dim ostyle1 As New MapInfo.Styles.SimpleVectorPointStyle Dim ostyle2 As New MapInfo.Styles.SimpleLineStyle Dim ostyle3 As New MapInfo.Styles.AreaStyle Dim ostyle4 As New MapInfo.Styles.TextStyle Dim ostyle As New MapInfo.Styles.FontPointStyle 'Dim ostyle As New MapInfo.Styles.SimpleVectorPointStyle Dim opoint As MapInfo.Geometry.Point Dim k As MapInfo.Data.Key oLayer = mapcontrol.Map.Layers("TempLayer") otable = oLayer.Table opoint = New MapInfo.Geometry.Point(mapcontrol.Map.GetDisplayCoordSys, mapcontrol.Map.Bounds.Center.x, mapcontrol.Map.Bounds.Center.y) ''ostyle1 = New MapInfo.Styles.CompositeStyle(ostyle3, ostyle2, ostyle4, ostyle1,) ostyle.Font.Name = "宋体" ostyle.PointSize = 30 ostyle.Color = System.Drawing.Color.Red oftr = New MapInfo.Data.Feature(opoint, ostyle) k = otable.InsertFeature(oftr)
|