两种方法在VB+MAPX中在指定坐标处添加符号

前端之家收集整理的这篇文章主要介绍了两种方法在VB+MAPX中在指定坐标处添加符号前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

两种方法在VB+MAPX中在指定坐标处添加符号
第一种方法
Private Sub Command1_Click()
Dim X As Double,Y As Double
X = Text1.Text
Y = Text2.Text
Map1.Annotations.addsymbol X,Y
End Sub
第二种方法
Private Sub Command1_Click()
Dim C_X As Double,C_Y As Double
Dim FeaFac As MapXLib.FeatureFactory
Dim Fea As New MapXLib.Feature
Dim Pts As New MapXLib.Points,Pt As New MapXLib.Point
C_XString = Text1.Text
C_YString = Text2.Text
C_X = Val(C_XString)
C_Y = Val(C_YString)
Fea.Attach form1.Map1
Fea.Type = miFeatureTypeSymbol
Fea.Style = form1.Map1.DefaultStyle
Fea.Point.Set C_X,C_Y
form1.Map1.Layers(1).AddFeature Fea
form1.Map1.Refresh
end sub

猜你在找的VB相关文章