阅读:1233回复:0
谁来帮我看看这段源代码,谢谢~~~
工作原因小弟刚看两天MAPX。要做GPS跟踪的,死得惨...下面一段模拟代码怎么不可以运行的?请赐教谢谢!!~!
Dim sngLong Dim sngLat Dim MobileObj As MapXLib.Feature Dim MobileFtr As New MapXLib.Feature Dim Lyr As Layer Set Lyr = Map1.Layers.CreateLayer("GPSLayer") MobileFtr.Attach Map1 Set Map1.Layers.AnimationLayer = Map1.Layers.Item("GPSLayer") MobileFtr.Type = miFeatureTypeText MobileFtr.Style = Map1.DefaultStyle MobileFtr.Caption = "*" sngLong = 0 sngLat = 0 MobileFtr.Point.Set sngLong, sngLat Set MobileObj = Map1.Layers.Item("GPSLayer").AddFeature(MobileFtr) Set Map1.Bounds = Map1.Layers.Item("GPSLayer").Bounds Private Sub HS_Change() TX.Text = HS.Value MobileFtr.Point.Set HS.Value, VS.Value Map1.Layers.Item("GPSLayer").Refresh End Sub Private Sub VS_Change() TY.Text = VS.Value MobileFtr.Point.Set HS.Value, VS.Value Map1.Layers.Item("GPSLayer").Refresh End Sub Private Sub Command1_Click() MsgBox MobileFtr.Point.x MsgBox MobileFtr.Point.Y End Sub 我要移动一个*号,能看出实际上他的坐标已经变了!但是在图上放大了还是一点动静也没有的? 怎么回事啊?谢谢!! |
|