我用这段代码解决了这个问题:
Try
form1.Mapbox1.Map.Layers.Clear()
Dim Map As Map = New Map()
Dim xmlDoc As New XmlDocument()
If My.Settings.Cache Then
xmlDoc.Load("http://" & My.Settings.ServerIP & ":" & My.Settings.ServerPort & "/" & My.Settings.ServerName & "/gwc/service/wms?SERVICE=WMS&VERSION=" & My.Settings.WMSVer & "&REQUEST=getcapabilities&TRANSPARENT=TRUE&TILED=true")
Else
xmlDoc.Load("http://" & My.Settings.ServerIP & ":" & My.Settings.ServerPort & "/" & My.Settings.ServerName & "/wms?SERVICE=WMS&VERSION=" & My.Settings.WMSVer & "&REQUEST=getcapabilities&TRANSPARENT=TRUE&TILED=true")
End If
Dim xDoc = Program.ConvertToXDocument(xmlDoc)
Dim source As List(Of ITileSource)
source = WmscTileSource.CreateFromWmscCapabilties((xDoc))
Dim tileSource = source.FirstOrDefault(Function(x) x.Schema.Name = My.Settings.WorkSapce & ":" & My.Settings.LayerName)
Dim tileLayer = New TileAsyncLayer(tileSource, My.Settings.WorkSapce & ":" & My.Settings.LayerName) With {.SRID = My.Settings.SRIDNum}
tileLayer.OnlyRedrawWhenComplete = True
form1.Mapbox1.Map.Layers.Add(tileLayer)
form1.Mapbox1.PanOnClick = True
Dim env = New Envelope(44.0509701, 25.0652748, 63.3556599, 39.796795)
form1.Mapbox1.Map.ZoomToBox(env)
form1.Mapbox1.Map.ZoomToExtents()
form1.Mapbox1.Map.Center = New Coordinate(53.682362, 32.420654)
form1.Mapbox1.Refresh()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try