📄 form1.frm
字号:
Layer8.visible = 0 'False
Layer8.selectable= -1 'True
Layer8.editable = 0 'False
Layer8.shownodes= 0 'False
Layer8.showcentroids= 0 'False
Layer8.showlinedirection= 0 'False
Layer8.autolabel= 0 'False
Layer8.zoomlayering= 0 'False
Layer8.minzoom = 0
Layer8.maxzoom = 0
Layer8.DrawLabelsAfter= 0 'False
Layer8.styleoverride= 0 'False
Layer8.labelstyle.TextFontBackColor= 16777215
Layer8.labelstyle.SymbolChar= 0
BeginProperty Layer8.labelstyle.TextFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "System"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Layer8.labelstyle.LineStyle= 1
Layer8.labelstyle.LineWidth= 1
Layer8.LabelMax = 100
Layer8.LabelOverlap= 0 'False
Layer8.LabelDuplicate= -1 'True
Layer8.LabelOffset= 2
Layer8.LabelLineType= 2
Layer8.LabelZoomMax= 10000
Layer8.LabelZoomMin= 0
Layer8.LabelZoom= 0 'False
Layer8.LabelVisible= -1 'True
Layer8.LabelOrientation= 5
Layer8.LabelParellel= -1 'True
Layer8.PartialSegments= 0 'False
Layer9.path = "TC-B LINK.tab"
Layer9.name = "TC-B LINK"
Layer9.visible = 0 'False
Layer9.selectable= -1 'True
Layer9.editable = 0 'False
Layer9.shownodes= 0 'False
Layer9.showcentroids= 0 'False
Layer9.showlinedirection= 0 'False
Layer9.autolabel= 0 'False
Layer9.zoomlayering= 0 'False
Layer9.minzoom = 0
Layer9.maxzoom = 0
Layer9.DrawLabelsAfter= 0 'False
Layer9.styleoverride= 0 'False
Layer9.labelstyle.TextFontBackColor= 16777215
Layer9.labelstyle.SymbolChar= 0
BeginProperty Layer9.labelstyle.TextFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "System"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Layer9.labelstyle.LineStyle= 1
Layer9.labelstyle.LineWidth= 1
Layer9.LabelMax = 100
Layer9.LabelOverlap= 0 'False
Layer9.LabelDuplicate= 0 'False
Layer9.LabelOffset= 2
Layer9.LabelLineType= 2
Layer9.LabelZoomMax= 10000
Layer9.LabelZoomMin= 0
Layer9.LabelZoom= 0 'False
Layer9.LabelVisible= -1 'True
Layer9.LabelOrientation= 2
Layer9.LabelParellel= -1 'True
Layer9.PartialSegments= 0 'False
Layer10.path = "XiaoQu.TAB"
Layer10.name = "XiaoQu"
Layer10.visible = -1 'True
Layer10.selectable= -1 'True
Layer10.editable= 0 'False
Layer10.shownodes= 0 'False
Layer10.showcentroids= 0 'False
Layer10.showlinedirection= 0 'False
Layer10.autolabel= 0 'False
Layer10.zoomlayering= 0 'False
Layer10.minzoom = 0
Layer10.maxzoom = 0
Layer10.DrawLabelsAfter= 0 'False
Layer10.styleoverride= 0 'False
Layer10.labelstyle.TextFontBackColor= 16777215
Layer10.labelstyle.SymbolChar= 0
BeginProperty Layer10.labelstyle.TextFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "System"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Layer10.labelstyle.LineStyle= 1
Layer10.labelstyle.LineWidth= 1
Layer10.LabelMax= 100
Layer10.LabelOverlap= 0 'False
Layer10.LabelDuplicate= -1 'True
Layer10.LabelOffset= 2
Layer10.LabelLineType= 0
Layer10.LabelZoomMax= 10000
Layer10.LabelZoomMin= 0
Layer10.LabelZoom= 0 'False
Layer10.LabelVisible= -1 'True
Layer10.LabelOrientation= 0
Layer10.LabelParellel= -1 'True
Layer10.PartialSegments= 0 'False
TitleStyle.TextFontBackColor= 16777215
TitleStyle.TextFontOpaque= -1 'True
TitleStyle.SymbolChar= 0
BeginProperty TitleStyle.TextFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 33
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty TitleStyle.SymbolFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 23.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
DefaultStyle.TextFontBackColor= 16777215
DefaultStyle.SupportsBitmapSymbols= -1 'True
DefaultStyle.SymbolChar= 35
DefaultStyle.SymbolFontColor= 255
DefaultStyle.SymbolFontBackColor= 16777215
BeginProperty DefaultStyle.TextFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty DefaultStyle.SymbolFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Map Symbols"
Size = 8.25
Charset = 2
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
DefaultStyle.LineStyle= 1
DefaultStyle.LineWidth= 1
DefaultStyle.RegionColor= 16777215
DefaultStyle.LinePattern= 2
DefaultStyle.RegionBackColor= 16777215
DefaultStyle.RegionBorderStyle= 1
DefaultStyle.RegionBorderWidth= 1
HasProjectionInfo= -1 'True
NumericCoordsys = "Form1.frx":9EBF2
DisplayCoordsys = "Form1.frx":9ED22
NumDatasets = 0
TitleX = 5000
TitleY = 1000
TitleVisible = 0 'False
TitleEditable = -1 'True
TitlePostiion = 0
TitleBorder = -1 'True
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Lyr1 As Layer
Dim Lyr2 As Layer
Dim pt2 As New Point
Dim symbol2 As Feature
Dim mapsymbol2 As Feature
Private Sub fangda_Click()
Map1.CurrentTool = miZoomInTool
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
Timer2.Enabled = False
Map1.Height = Form1.Height
Form1.Width = Map1.Width + Frame1.Width
Frame1.Left = Form1.Left + Map1.Width
Frame1.Height = Form1.Height
'GpsComm.PortOpen = False
End Sub
Private Sub Form_Resize()
Map1.Height = Form1.Height
Map1.Width = Form1.Width - Frame1.Width
Frame1.Left = Form1.Left + Map1.Width
Frame1.Height = Form1.Height
End Sub
Private Sub pingyi_Click()
Map1.CurrentTool = miPanTool
End Sub
Private Sub pipei_Click()
Set Lyr2 = Map1.Layers.CreateLayer("pipei", , , 1)
Timer2.Enabled = True
End Sub
Private Sub suaoxiao_Click()
Map1.CurrentTool = miZoomOutTool
End Sub
Private Sub tingzhi_Click()
Timer1.Enabled = False
Timer2.Enabled = False
Adodc1.Recordset.MoveFirst
End Sub
Private Sub yuanshi_Click()
Set Lyr1 = Map1.Layers.CreateLayer(xianshi, , , 1)
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Dim GpsX As Double
Dim GpsY As Double
Dim CarSpeed As Double
Dim CarDirection As Double
If Adodc1.Recordset.EOF = True Then
MsgBox "数据读取完毕"
Timer1.Enabled = False
Adodc1.Recordset.MoveFirst
Exit Sub
Else
GpsX = Adodc1.Recordset.Fields("精度值").Value
GpsY = Adodc1.Recordset.Fields("纬度值").Value
Adodc1.Recordset.MoveNext
End If
Dim pt1 As New Point
pt1.Set GpsX, GpsY
Dim symbol1 As Feature
Set symbol1 = Map1.FeatureFactory.CreateSymbol(pt1, Map1.DefaultStyle)
Dim mapsymbol1 As Feature
Set mapsymbol1 = Lyr1.AddFeature(symbol1)
mapsymbol1.Point.Set GpsX, GpsY
mapsymbol1.Update
Lyr1.Refresh
End Sub
Private Sub Timer2_Timer()
Dim GpsX As Double
Dim GpsY As Double
Dim CarSpeed As Double
Dim CarDirection As Double
Dim JieGuo As Car
Dim CarGpsX As Double
Dim CarGpsY As Double
If Adodc1.Recordset.EOF = True Then
MsgBox "数据读取完毕"
Timer2.Enabled = False
Adodc1.Recordset.MoveFirst
Exit Sub
Else
GpsX = Adodc1.Recordset.Fields("精度值").Value
GpsY = Adodc1.Recordset.Fields("纬度值").Value
CarSpeed = Adodc1.Recordset.Fields("速度").Value
Adodc1.Recordset.MoveNext
End If
JieGuo = MapMatch(GpsX, GpsY, CarSpeed)
CarGpsX = JieGuo.X
CarGpsY = JieGuo.Y
pt2.Set CarGpsX, CarGpsY
Set symbol2 = Map1.FeatureFactory.CreateSymbol(pt2, Map1.DefaultStyle)
Set mapsymbol2 = Lyr2.AddFeature(symbol2)
'mapsymbol2.Point.Set CarGpsX, CarGpsY
Lyr2.Refresh
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -