阅读:1108回复:0
mo中使用truetype符号的例子
新建立工程,拷贝代码进去,加上map1,运行
Option Explicit Private Sub Form_Load() Dim fnt As New StdFont fnt.Name = "Wingdings" 'TrueType font Map1.TrackingLayer.SymbolCount = 1 With Map1.TrackingLayer.Symbol(0) .Font = fnt .Size = 18 .Style = moTrueTypeMarker .Color = moBlack End With End Sub Private Sub Map1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) Static chridx With Map1.TrackingLayer If .EventCount > 0 Then .RemoveEvent 0 End With If chridx = 0 Then chridx = 33 With Map1.Extent.Center Dim pt As MapObjects2.Point Set pt = Map1.ToMapPoint(x, y) Map1.TrackingLayer.AddEvent pt, 0 End With Map1.TrackingLayer.Symbol(0).CharacterIndex = chridx chridx = chridx + 1 End Sub |
|